<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name=Generator content="Microsoft Word 14 (filtered)">

<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Wingdings;
	panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
	{font-family:宋体;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:黑体;
	panose-1:2 1 6 9 6 1 1 1 1 1;}
@font-face
	{font-family:黑体;
	panose-1:2 1 6 9 6 1 1 1 1 1;}
@font-face
	{font-family:方正小标宋简体;}
@font-face
	{font-family:"\@黑体";
	panose-1:2 1 6 9 6 1 1 1 1 1;}
@font-face
	{font-family:"\@宋体";
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:"\@方正小标宋简体";}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.5pt;
	font-family:宋体;}
h1
	{mso-style-link:"标题 1 Char";
	margin-top:17.0pt;
	margin-right:0cm;
	margin-bottom:16.5pt;
	margin-left:7.2pt;
	text-align:center;
	text-indent:-7.2pt;
	page-break-after:avoid;
	font-size:22.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
h2
	{mso-style-link:"标题 2 Char";
	margin-top:13.0pt;
	margin-right:0cm;
	margin-bottom:13.0pt;
	margin-left:0cm;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:0cm;
	page-break-after:avoid;
	font-size:16.0pt;
	font-family:"Arial","sans-serif";
	font-weight:bold;}
h3
	{mso-style-link:"标题 3 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:0cm;
	page-break-after:avoid;
	font-size:14.0pt;
	font-family:"Arial","sans-serif";
	font-weight:bold;}
h4
	{mso-style-link:"标题 4 Char";
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:28.8pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-28.8pt;
	page-break-after:avoid;
	font-size:12.0pt;
	font-family:"Arial","sans-serif";
	font-weight:bold;}
h5
	{mso-style-link:"标题 5 Char";
	margin-top:14.0pt;
	margin-right:0cm;
	margin-bottom:14.5pt;
	margin-left:36.0pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-36.0pt;
	line-height:156%;
	page-break-after:avoid;
	font-size:14.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
h6
	{mso-style-link:"标题 6 Char";
	margin-top:12.0pt;
	margin-right:0cm;
	margin-bottom:3.2pt;
	margin-left:43.2pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-43.2pt;
	line-height:133%;
	page-break-after:avoid;
	font-size:12.0pt;
	font-family:"Arial","sans-serif";
	font-weight:bold;}
p.MsoHeading7, li.MsoHeading7, div.MsoHeading7
	{mso-style-link:"标题 7 Char";
	margin-top:12.0pt;
	margin-right:0cm;
	margin-bottom:3.2pt;
	margin-left:50.4pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-50.4pt;
	line-height:133%;
	page-break-after:avoid;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.MsoHeading8, li.MsoHeading8, div.MsoHeading8
	{mso-style-link:"标题 8 Char";
	margin-top:12.0pt;
	margin-right:0cm;
	margin-bottom:3.2pt;
	margin-left:57.6pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-72.0pt;
	line-height:133%;
	page-break-after:avoid;
	font-size:12.0pt;
	font-family:"Arial","sans-serif";}
p.MsoHeading9, li.MsoHeading9, div.MsoHeading9
	{mso-style-link:"标题 9 Char";
	margin-top:12.0pt;
	margin-right:0cm;
	margin-bottom:3.2pt;
	margin-left:64.8pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-79.2pt;
	line-height:133%;
	page-break-after:avoid;
	font-size:10.0pt;
	font-family:"Arial","sans-serif";}
p.MsoIndex1, li.MsoIndex1, div.MsoIndex1
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:10.5pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-10.5pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoIndex2, li.MsoIndex2, div.MsoIndex2
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:21.0pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-10.5pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoIndex3, li.MsoIndex3, div.MsoIndex3
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:31.5pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-10.5pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoIndex4, li.MsoIndex4, div.MsoIndex4
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:42.0pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-10.5pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoIndex5, li.MsoIndex5, div.MsoIndex5
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:52.5pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-10.5pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoIndex6, li.MsoIndex6, div.MsoIndex6
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:63.0pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-10.5pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoIndex7, li.MsoIndex7, div.MsoIndex7
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:73.5pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-10.5pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoIndex8, li.MsoIndex8, div.MsoIndex8
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:84.0pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-10.5pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoIndex9, li.MsoIndex9, div.MsoIndex9
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:94.5pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-10.5pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoToc1, li.MsoToc1, div.MsoToc1
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.MsoToc2, li.MsoToc2, div.MsoToc2
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:21.0pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoToc3, li.MsoToc3, div.MsoToc3
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:42.0pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoToc4, li.MsoToc4, div.MsoToc4
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:31.5pt;
	margin-bottom:.0001pt;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.MsoToc5, li.MsoToc5, div.MsoToc5
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:42.0pt;
	margin-bottom:.0001pt;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.MsoToc6, li.MsoToc6, div.MsoToc6
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:52.5pt;
	margin-bottom:.0001pt;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.MsoToc7, li.MsoToc7, div.MsoToc7
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:63.0pt;
	margin-bottom:.0001pt;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.MsoToc8, li.MsoToc8, div.MsoToc8
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:73.5pt;
	margin-bottom:.0001pt;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.MsoToc9, li.MsoToc9, div.MsoToc9
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:84.0pt;
	margin-bottom:.0001pt;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.MsoFootnoteText, li.MsoFootnoteText, div.MsoFootnoteText
	{mso-style-link:"脚注文本 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	layout-grid-mode:char;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.MsoCommentText, li.MsoCommentText, div.MsoCommentText
	{mso-style-link:"批注文字 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoHeader, li.MsoHeader, div.MsoHeader
	{mso-style-link:"页眉 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	layout-grid-mode:char;
	border:none;
	padding:0cm;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.MsoFooter, li.MsoFooter, div.MsoFooter
	{mso-style-link:"页脚 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	layout-grid-mode:char;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.MsoIndexHeading, li.MsoIndexHeading, div.MsoIndexHeading
	{mso-style-name:"索引标题\,索引类目\,索引类目1\,索引类目2";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoCaption, li.MsoCaption, div.MsoCaption
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Arial","sans-serif";}
p.MsoTof, li.MsoTof, div.MsoTof
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:42.0pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-21.0pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.MsoFootnoteReference
	{vertical-align:super;}
p.MsoList, li.MsoList, div.MsoList
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:21.0pt;
	margin-bottom:.0001pt;
	text-align:center;
	text-indent:-21.0pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoList2, li.MsoList2, div.MsoList2
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoList4, li.MsoList4, div.MsoList4
	{margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.MsoDate, li.MsoDate, div.MsoDate
	{mso-style-link:"日期 Char";
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:5.0pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
	{mso-style-name:"超链接\,超级链接";
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
p
	{mso-style-name:"普通\(网站\)\,普通 \(Web\)\,普通 \(Web\)1\,普通 \(Web\)2\,普通 \(Web\)3";
	margin-right:0cm;
	margin-left:0cm;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
pre
	{mso-style-name:"HTML 预设格式\,HTML 预先格式化\,HTML 预先格式化1\,HTML 预先格式化2\,HTML 预先格式化3";
	mso-style-link:"HTML 预设格式 Char\,HTML 预先格式化 Char\,HTML 预先格式化1 Char\,HTML 预先格式化2 Char\,HTML 预先格式化3 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman","serif";}
tt
	{font-family:黑体;}
p.MsoCommentSubject, li.MsoCommentSubject, div.MsoCommentSubject
	{mso-style-link:"批注主题 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
	{mso-style-link:"批注框文本 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.1, li.1, div.1
	{mso-style-name:样式1;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:21.0pt;
	margin-bottom:.0001pt;
	text-align:center;
	text-indent:-21.0pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.a, li.a, div.a
	{mso-style-name:代码程序;
	mso-style-link:"代码程序 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:宋体;}
span.Char
	{mso-style-name:"代码程序 Char";
	mso-style-link:代码程序;
	font-family:宋体;}
p.a0, li.a0, div.a0
	{mso-style-name:图说明;
	mso-style-link:"图说明 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.Char0
	{mso-style-name:"图说明 Char";
	mso-style-link:图说明;
	font-family:宋体;}
p.0, li.0, div.0
	{mso-style-name:封面0;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:36.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.10, li.10, div.10
	{mso-style-name:封面1;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:18.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.11, li.11, div.11
	{mso-style-name:非标题1;
	margin-top:7.8pt;
	margin-right:0cm;
	margin-bottom:7.8pt;
	margin-left:0cm;
	text-align:center;
	font-size:22.0pt;
	font-family:宋体;
	font-weight:bold;}
p.a1, li.a1, div.a1
	{mso-style-name:文本居中;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.3CharChar, li.3CharChar, div.3CharChar
	{mso-style-name:"图中文字3 Char Char";
	mso-style-link:"图中文字3 Char Char Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	line-height:9.0pt;
	font-size:8.0pt;
	font-family:"Times New Roman","serif";}
span.3CharCharChar
	{mso-style-name:"图中文字3 Char Char Char";
	mso-style-link:"图中文字3 Char Char";
	font-family:宋体;}
p.post, li.post, div.post
	{mso-style-name:邮件post;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:right;
	line-height:11.0pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.3, li.3, div.3
	{mso-style-name:图中字体3;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.3CharChar1CharCharChar
	{mso-style-name:"图中文字3 Char Char1 Char Char Char";
	font-family:宋体;}
span.3CharChar1CharChar
	{mso-style-name:"图中文字3 Char Char1 Char Char";
	font-family:宋体;}
p.5Char, li.5Char, div.5Char
	{mso-style-name:"图中文字5号 Char";
	mso-style-link:"图中文字5号 Char Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.5CharChar
	{mso-style-name:"图中文字5号 Char Char";
	mso-style-link:"图中文字5号 Char";
	font-family:宋体;}
p.5CharChar0, li.5CharChar0, div.5CharChar0
	{mso-style-name:"图中文字小5号 Char Char";
	mso-style-link:"图中文字小5号 Char Char Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
span.5CharCharChar
	{mso-style-name:"图中文字小5号 Char Char Char";
	mso-style-link:"图中文字小5号 Char Char";
	font-family:宋体;}
p.5Char0, li.5Char0, div.5Char0
	{mso-style-name:"图中文字小5号 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.5, li.5, div.5
	{mso-style-name:图中文字小5号;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	layout-grid-mode:char;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.2, li.2, div.2
	{mso-style-name:代码程序2;
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:宋体;}
p.20, li.20, div.20
	{mso-style-name:图说明2;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.21, li.21, div.21
	{mso-style-name:文本居中2;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.3CharCharCharCharChar, li.3CharCharCharCharChar, div.3CharCharCharCharChar
	{mso-style-name:"图中文字3 Char Char Char Char Char";
	mso-style-link:"图中文字3 Char Char Char Char Char Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	line-height:9.0pt;
	font-size:8.0pt;
	font-family:"Times New Roman","serif";}
span.3CharCharCharCharCharChar
	{mso-style-name:"图中文字3 Char Char Char Char Char Char";
	mso-style-link:"图中文字3 Char Char Char Char Char";
	font-family:宋体;}
p.a2, li.a2, div.a2
	{mso-style-name:图居中;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.110, li.110, div.110
	{mso-style-name:"样式 标题 1 + 居中1";
	margin-right:0cm;
	margin-left:0cm;
	text-align:center;
	page-break-after:avoid;
	font-size:22.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
span.1Char
	{mso-style-name:"标题 1 Char";
	mso-style-link:"标题 1";
	font-weight:bold;}
p.22, li.22, div.22
	{mso-style-name:"样式 列表 2 + 居中";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.23, li.23, div.23
	{mso-style-name:列表2;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.50, li.50, div.50
	{mso-style-name:图中文字5号;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.111, li.111, div.111
	{mso-style-name:样式11;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:21.0pt;
	margin-bottom:.0001pt;
	text-align:center;
	text-indent:-21.0pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.12, li.12, div.12
	{mso-style-name:代码程序1;
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:宋体;}
p.13, li.13, div.13
	{mso-style-name:图说明1;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.01, li.01, div.01
	{mso-style-name:封面01;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:36.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.112, li.112, div.112
	{mso-style-name:封面11;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:18.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.113, li.113, div.113
	{mso-style-name:非标题11;
	margin-top:7.8pt;
	margin-right:0cm;
	margin-bottom:7.8pt;
	margin-left:0cm;
	text-align:center;
	font-size:22.0pt;
	font-family:宋体;
	font-weight:bold;}
p.14, li.14, div.14
	{mso-style-name:文本居中1;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.3Char1, li.3Char1, div.3Char1
	{mso-style-name:"图中文字3 Char1";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	line-height:9.0pt;
	font-size:8.0pt;
	font-family:"Times New Roman","serif";}
p.post1, li.post1, div.post1
	{mso-style-name:邮件post1;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:right;
	line-height:11.0pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.31, li.31, div.31
	{mso-style-name:图中字体31;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.5Char1, li.5Char1, div.5Char1
	{mso-style-name:"图中文字5号 Char1";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.5CharChar1, li.5CharChar1, div.5CharChar1
	{mso-style-name:"图中文字小5号 Char Char1";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.5Char10, li.5Char10, div.5Char10
	{mso-style-name:"图中文字小5号 Char1";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.51, li.51, div.51
	{mso-style-name:图中文字小5号1;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.120, li.120, div.120
	{mso-style-name:样式12;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:21.0pt;
	margin-bottom:.0001pt;
	text-align:center;
	text-indent:-21.0pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.02, li.02, div.02
	{mso-style-name:封面02;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:36.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.121, li.121, div.121
	{mso-style-name:封面12;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:18.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.122, li.122, div.122
	{mso-style-name:非标题12;
	margin-top:7.8pt;
	margin-right:0cm;
	margin-bottom:7.8pt;
	margin-left:0cm;
	text-align:center;
	font-size:22.0pt;
	font-family:宋体;
	font-weight:bold;}
p.3Char2, li.3Char2, div.3Char2
	{mso-style-name:"图中文字3 Char2";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	line-height:9.0pt;
	font-size:8.0pt;
	font-family:"Times New Roman","serif";}
p.post2, li.post2, div.post2
	{mso-style-name:邮件post2;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:right;
	line-height:11.0pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.32, li.32, div.32
	{mso-style-name:图中字体32;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.5Char2, li.5Char2, div.5Char2
	{mso-style-name:"图中文字小5号 Char2";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.52, li.52, div.52
	{mso-style-name:图中文字小5号2;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.3CharCharCharChar, li.3CharCharCharChar, div.3CharCharCharChar
	{mso-style-name:"图中文字3 Char Char Char Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	line-height:9.0pt;
	font-size:8.0pt;
	font-family:"Times New Roman","serif";}
p.130, li.130, div.130
	{mso-style-name:样式13;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:21.0pt;
	margin-bottom:.0001pt;
	text-align:center;
	text-indent:-21.0pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.30, li.30, div.30
	{mso-style-name:代码程序3;
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:10.0pt;
	font-family:宋体;}
p.03, li.03, div.03
	{mso-style-name:封面03;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:36.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.131, li.131, div.131
	{mso-style-name:封面13;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:18.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.132, li.132, div.132
	{mso-style-name:非标题13;
	margin-top:7.8pt;
	margin-right:0cm;
	margin-bottom:7.8pt;
	margin-left:0cm;
	text-align:center;
	font-size:22.0pt;
	font-family:宋体;
	font-weight:bold;}
p.33, li.33, div.33
	{mso-style-name:文本居中3;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.3Char3, li.3Char3, div.3Char3
	{mso-style-name:"图中文字3 Char3";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	line-height:9.0pt;
	font-size:8.0pt;
	font-family:"Times New Roman","serif";}
p.post3, li.post3, div.post3
	{mso-style-name:邮件post3;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:right;
	line-height:11.0pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.330, li.330, div.330
	{mso-style-name:图中字体33;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.5Char20, li.5Char20, div.5Char20
	{mso-style-name:"图中文字5号 Char2";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.5CharChar2, li.5CharChar2, div.5CharChar2
	{mso-style-name:"图中文字小5号 Char Char2";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.5Char3, li.5Char3, div.5Char3
	{mso-style-name:"图中文字小5号 Char3";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.53, li.53, div.53
	{mso-style-name:图中文字小5号3;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.3Char, li.3Char, div.3Char
	{mso-style-name:"图中文字3 Char";
	mso-style-link:"图中文字3 Char Char5";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	line-height:9.0pt;
	font-size:8.0pt;
	font-family:"Times New Roman","serif";}
span.3CharChar5
	{mso-style-name:"图中文字3 Char Char5";
	mso-style-link:"图中文字3 Char";
	font-family:宋体;}
p.54, li.54, div.54
	{mso-style-name:图中文字小5紧密;
	margin:0cm;
	margin-bottom:.0001pt;
	line-height:9.0pt;
	text-autospace:ideograph-numeric;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.24, li.24, div.24
	{mso-style-name:居中2号粗宋体;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:22.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.15, li.15, div.15
	{mso-style-name:"样式 标题 1 + 居中";
	margin-top:17.0pt;
	margin-right:0cm;
	margin-bottom:16.5pt;
	margin-left:0cm;
	text-align:center;
	page-break-after:avoid;
	font-size:22.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.25, li.25, div.25
	{mso-style-name:"样式 标题 2 + 行距\: 单倍行距";
	margin-top:13.0pt;
	margin-right:0cm;
	margin-bottom:13.0pt;
	margin-left:28.9pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-28.9pt;
	page-break-after:avoid;
	font-size:16.0pt;
	font-family:"Arial","sans-serif";
	font-weight:bold;}
span.2Char
	{mso-style-name:"标题 2 Char";
	mso-style-link:"标题 2";
	font-family:"Arial","sans-serif";
	font-weight:bold;}
p.34, li.34, div.34
	{mso-style-name:列表3;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.35, li.35, div.35
	{mso-style-name:表3;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.4, li.4, div.4
	{mso-style-name:图说明4;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.40, li.40, div.40
	{mso-style-name:列表4;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:21.0pt;
	margin-bottom:.0001pt;
	text-align:center;
	text-indent:-21.0pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.41, li.41, div.41
	{mso-style-name:表4;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.55, li.55, div.55
	{mso-style-name:图说明5;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.56, li.56, div.56
	{mso-style-name:列表5;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.57, li.57, div.57
	{mso-style-name:表5;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.6, li.6, div.6
	{mso-style-name:列表6;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.60, li.60, div.60
	{mso-style-name:表6;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.61, li.61, div.61
	{mso-style-name:图说明6;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.7, li.7, div.7
	{mso-style-name:列表7;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.70, li.70, div.70
	{mso-style-name:图说明7;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.71, li.71, div.71
	{mso-style-name:表7;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.8, li.8, div.8
	{mso-style-name:列表8;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.9, li.9, div.9
	{mso-style-name:列表9;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.90, li.90, div.90
	{mso-style-name:图说明9;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.100, li.100, div.100
	{mso-style-name:列表10;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.101, li.101, div.101
	{mso-style-name:图说明10;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.114, li.114, div.114
	{mso-style-name:列表11;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.115, li.115, div.115
	{mso-style-name:图说明11;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.116, li.116, div.116
	{mso-style-name:表11;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.123, li.123, div.123
	{mso-style-name:列表12;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.124, li.124, div.124
	{mso-style-name:图说明12;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.133, li.133, div.133
	{mso-style-name:图说明13;
	mso-style-link:"图说明13 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.13Char
	{mso-style-name:"图说明13 Char";
	mso-style-link:图说明13;
	font-family:宋体;}
p.134, li.134, div.134
	{mso-style-name:列表13;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.26, li.26, div.26
	{mso-style-name:附录2;
	margin-top:13.0pt;
	margin-right:0cm;
	margin-bottom:13.0pt;
	margin-left:0cm;
	text-align:justify;
	text-justify:inter-ideograph;
	page-break-after:avoid;
	font-size:16.0pt;
	font-family:"Arial","sans-serif";
	font-weight:bold;}
p.36, li.36, div.36
	{mso-style-name:附录3;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	page-break-after:avoid;
	font-size:14.0pt;
	font-family:"Arial","sans-serif";
	font-weight:bold;}
span.3Char0
	{mso-style-name:"标题 3 Char";
	mso-style-link:"标题 3";
	font-family:"Arial","sans-serif";
	font-weight:bold;}
p.16, li.16, div.16
	{mso-style-name:附录1;
	margin-top:17.0pt;
	margin-right:0cm;
	margin-bottom:16.5pt;
	margin-left:0cm;
	text-align:center;
	page-break-after:avoid;
	font-size:22.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.17, li.17, div.17
	{mso-style-name:附录表1;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.42, li.42, div.42
	{mso-style-name:附录4;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	page-break-after:avoid;
	font-size:12.0pt;
	font-family:"Arial","sans-serif";
	font-weight:bold;}
span.4Char
	{mso-style-name:"标题 4 Char";
	mso-style-link:"标题 4";
	font-family:"Arial","sans-serif";
	font-weight:bold;}
p.a3, li.a3, div.a3
	{mso-style-name:附录图说明;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.27, li.27, div.27
	{mso-style-name:序标题2;
	margin-top:13.0pt;
	margin-right:0cm;
	margin-bottom:13.0pt;
	margin-left:28.8pt;
	text-align:justify;
	text-justify:inter-ideograph;
	text-indent:-28.8pt;
	page-break-after:avoid;
	font-size:16.0pt;
	font-family:"Arial","sans-serif";
	font-weight:bold;}
p.a4, li.a4, div.a4
	{mso-style-name:参考标题;
	margin-top:7.8pt;
	margin-right:0cm;
	margin-bottom:7.8pt;
	margin-left:0cm;
	text-align:center;
	page-break-after:avoid;
	font-size:22.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.18, li.18, div.18
	{mso-style-name:索引标题1;
	margin-top:7.8pt;
	margin-right:0cm;
	margin-bottom:7.8pt;
	margin-left:0cm;
	text-align:center;
	page-break-after:avoid;
	font-size:22.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.19, li.19, div.19
	{mso-style-name:列表1;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:21.25pt;
	margin-bottom:.0001pt;
	text-align:center;
	text-indent:-21.25pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.1a, li.1a, div.1a
	{mso-style-name:表1;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:21.25pt;
	margin-bottom:.0001pt;
	text-align:center;
	text-indent:-21.25pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.37, li.37, div.37
	{mso-style-name:图说明3;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.62, li.62, div.62
	{mso-style-name:表中字体6号;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	layout-grid-mode:char;
	font-size:7.5pt;
	font-family:"Times New Roman","serif";}
p.a5, li.a5, div.a5
	{mso-style-name:正文代码;
	mso-style-link:"正文代码 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.Char1
	{mso-style-name:"正文代码 Char";
	mso-style-link:正文代码;
	font-family:宋体;}
p.43, li.43, div.43
	{mso-style-name:"样式 标题 4 +";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	page-break-after:avoid;
	font-size:12.0pt;
	font-family:"Arial","sans-serif";
	font-weight:bold;}
p.140, li.140, div.140
	{mso-style-name:表14;
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:21.25pt;
	margin-bottom:.0001pt;
	text-align:center;
	text-indent:-21.25pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.141, li.141, div.141
	{mso-style-name:图说明14;
	mso-style-link:"图说明14 Char";
	margin-top:0cm;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:21.25pt;
	margin-bottom:.0001pt;
	text-align:center;
	text-indent:-21.25pt;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.14Char
	{mso-style-name:"图说明14 Char";
	mso-style-link:图说明14;
	font-family:宋体;}
p.a6, li.a6, div.a6
	{mso-style-name:文件目录表;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.a7, li.a7, div.a7
	{mso-style-name:"样式 正文 +";
	mso-style-link:"样式 正文 + Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.Char2
	{mso-style-name:"样式 正文 + Char";
	mso-style-link:"样式 正文 +";
	font-family:"Times New Roman","serif";}
p.a8, li.a8, div.a8
	{mso-style-name:表格题注;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.5pt;
	font-family:宋体;}
p.a9, li.a9, div.a9
	{mso-style-name:列表题注;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.5pt;
	font-family:"Arial","sans-serif";}
p.aa, li.aa, div.aa
	{mso-style-name:图题注;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.5pt;
	font-family:"Arial","sans-serif";}
p.ab, li.ab, div.ab
	{mso-style-name:程序题注;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.5pt;
	font-family:"Arial","sans-serif";}
p.ac, li.ac, div.ac
	{mso-style-name:框中文字;
	margin-top:0cm;
	margin-right:21.0pt;
	margin-bottom:0cm;
	margin-left:21.0pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	border:none;
	padding:0cm;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.125, li.125, div.125
	{mso-style-name:"样式 标题 1 + 居中2";
	margin-top:17.0pt;
	margin-right:0cm;
	margin-bottom:16.5pt;
	margin-left:0cm;
	text-align:center;
	page-break-after:avoid;
	font-size:22.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.ad, li.ad, div.ad
	{mso-style-name:"样式 题注 + 宋体 五号 居中";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.5pt;
	font-family:黑体;}
p.1b, li.1b, div.1b
	{mso-style-name:序标题1;
	margin-top:17.0pt;
	margin-right:0cm;
	margin-bottom:16.5pt;
	margin-left:0cm;
	line-height:240%;
	page-break-after:avoid;
	font-size:16.0pt;
	font-family:"Times New Roman","serif";
	font-weight:bold;}
p.38, li.38, div.38
	{mso-style-name:序标题3;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	page-break-after:avoid;
	font-size:12.0pt;
	font-family:方正小标宋简体;}
p.63, li.63, div.63
	{mso-style-name:表中文字6号;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:7.5pt;
	font-family:"Times New Roman","serif";}
p.64, li.64, div.64
	{mso-style-name:图中文字6号左对齐;
	margin:0cm;
	margin-bottom:.0001pt;
	line-height:10.0pt;
	layout-grid-mode:char;
	font-size:7.5pt;
	font-family:"Times New Roman","serif";}
p.65, li.65, div.65
	{mso-style-name:图中文字6号;
	mso-style-link:"图中文字6号 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	line-height:10.0pt;
	layout-grid-mode:char;
	font-size:7.5pt;
	font-family:"Times New Roman","serif";}
span.6Char
	{mso-style-name:"图中文字6号 Char";
	mso-style-link:图中文字6号;
	font-family:宋体;}
p.ae, li.ae, div.ae
	{mso-style-name:图标;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.28, li.28, div.28
	{mso-style-name:图标2;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.af, li.af, div.af
	{mso-style-name:习题标题;
	margin-top:6.0pt;
	margin-right:0cm;
	margin-bottom:0cm;
	margin-left:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	page-break-after:avoid;
	font-size:14.0pt;
	font-family:黑体;}
p.1c, li.1c, div.1c
	{mso-style-name:部分编号1;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:16.0pt;
	font-family:"Times New Roman","serif";}
p.af0, li.af0, div.af0
	{mso-style-name:表标题;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Arial","sans-serif";}
p.af1, li.af1, div.af1
	{mso-style-name:"样式 题注 + 居中";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
p.ListTitle, li.ListTitle, div.ListTitle
	{mso-style-name:ListTitle;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Arial","sans-serif";}
p.FigureTitle, li.FigureTitle, div.FigureTitle
	{mso-style-name:FigureTitle;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Arial","sans-serif";}
p.TableTitle, li.TableTitle, div.TableTitle
	{mso-style-name:TableTitle;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Arial","sans-serif";}
p.ProgramTitle, li.ProgramTitle, div.ProgramTitle
	{mso-style-name:ProgramTitle;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:center;
	font-size:10.0pt;
	font-family:"Arial","sans-serif";}
p.RightText, li.RightText, div.RightText
	{mso-style-name:RightText;
	margin-top:0cm;
	margin-right:21.0pt;
	margin-bottom:0cm;
	margin-left:42.0pt;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	border:none;
	padding:0cm;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.af2, li.af2, div.af2
	{mso-style-name:表中文字小五;
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.af3, li.af3, div.af3
	{mso-style-name:关键词;
	mso-style-link:"关键词 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.Char3
	{mso-style-name:"关键词 Char";
	mso-style-link:关键词;
	font-family:宋体;}
p.af4, li.af4, div.af4
	{mso-style-name:文件名;
	mso-style-link:"文件名 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.Char4
	{mso-style-name:"文件名 Char";
	mso-style-link:文件名;
	font-family:宋体;}
p.af5, li.af5, div.af5
	{mso-style-name:选项;
	mso-style-link:"选项 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.Char5
	{mso-style-name:"选项 Char";
	mso-style-link:选项;
	font-family:宋体;}
p.af6, li.af6, div.af6
	{mso-style-name:命令行;
	mso-style-link:"命令行 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.Char6
	{mso-style-name:"命令行 Char";
	mso-style-link:命令行;
	font-family:宋体;}
p.af7, li.af7, div.af7
	{mso-style-name:函数名;
	mso-style-link:"函数名 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.Char7
	{mso-style-name:"函数名 Char";
	mso-style-link:函数名;
	font-family:宋体;}
p.af8, li.af8, div.af8
	{mso-style-name:寄存器名;
	mso-style-link:"寄存器名 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.Char8
	{mso-style-name:"寄存器名 Char";
	mso-style-link:寄存器名;
	font-family:"Times New Roman","serif";}
p.af9, li.af9, div.af9
	{mso-style-name:变量名;
	mso-style-link:"变量名 Char";
	margin:0cm;
	margin-bottom:.0001pt;
	text-align:justify;
	text-justify:inter-ideograph;
	font-size:10.0pt;
	font-family:"Times New Roman","serif";}
span.Char9
	{mso-style-name:"变量名 Char";
	mso-style-link:变量名;
	font-family:宋体;}
p.58, li.58, div.58
	{mso-style-name:图中文字小5号左;
	margin:0cm;
	margin-bottom:.0001pt;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.59, li.59, div.59
	{mso-style-name:图中文字小5号靠左;
	margin:0cm;
	margin-bottom:.0001pt;
	layout-grid-mode:char;
	font-size:9.0pt;
	font-family:"Times New Roman","serif";}
p.926, li.926, div.926
	{mso-style-name:"样式 代码程序 + 左侧\:  9\.26 厘米";
	margin:0cm;
	margin-bottom:.0001pt;
	layout-grid-mode:char;
	font-size:10.0pt;
	font-family:宋体;}
span.5Char4
	{mso-style-name:"标题 5 Char";
	mso-style-link:"标题 5";
	font-weight:bold;}
span.6Char0
	{mso-style-name:"标题 6 Char";
	mso-style-link:"标题 6";
	font-family:"Arial","sans-serif";
	font-weight:bold;}
span.7Char
	{mso-style-name:"标题 7 Char";
	mso-style-link:"标题 7";
	font-weight:bold;}
span.8Char
	{mso-style-name:"标题 8 Char";
	mso-style-link:"标题 8";
	font-family:"Arial","sans-serif";}
span.9Char
	{mso-style-name:"标题 9 Char";
	mso-style-link:"标题 9";
	font-family:"Arial","sans-serif";}
span.Chara
	{mso-style-name:"脚注文本 Char";
	mso-style-link:脚注文本;
	font-family:宋体;}
span.Charb
	{mso-style-name:"批注文字 Char";
	mso-style-link:批注文字;
	font-family:宋体;}
span.Charc
	{mso-style-name:"页眉 Char";
	mso-style-link:页眉;
	font-family:宋体;}
span.Chard
	{mso-style-name:"页脚 Char";
	mso-style-link:页脚;
	font-family:宋体;}
span.Chare
	{mso-style-name:"日期 Char";
	mso-style-link:日期;
	font-family:宋体;}
span.HTMLChar
	{mso-style-name:"HTML 预设格式 Char\,HTML 预先格式化 Char\,HTML 预先格式化1 Char\,HTML 预先格式化2 Char\,HTML 预先格式化3 Char";
	mso-style-link:"HTML 预设格式\,HTML 预先格式化\,HTML 预先格式化1\,HTML 预先格式化2\,HTML 预先格式化3";
	font-family:宋体;}
span.Charf
	{mso-style-name:"批注主题 Char";
	mso-style-link:批注主题;
	font-family:宋体;
	font-weight:bold;}
span.Charf0
	{mso-style-name:"批注框文本 Char";
	mso-style-link:批注框文本;
	font-family:宋体;}
span.3CharChar1
	{mso-style-name:"图中文字3 Char Char1";
	font-family:宋体;}
span.3CharChar3
	{mso-style-name:"图中文字3 Char Char3";
	font-family:宋体;}
span.3CharCharChar1
	{mso-style-name:"图中文字3 Char Char Char1";
	font-family:宋体;}
span.3CharChar1Char
	{mso-style-name:"图中文字3 Char Char1 Char";
	font-family:宋体;}
.MsoChpDefault
	{font-size:10.0pt;}
 /* Page Definitions */
 @page WordSection1
	{size:595.3pt 841.9pt;
	margin:72.0pt 54.0pt 72.0pt 54.0pt;
	layout-grid:15.6pt;}
div.WordSection1
	{page:WordSection1;}
 /* List Definitions */
 ol
	{margin-bottom:0cm;}
ul
	{margin-bottom:0cm;}
-->
</style>

</head>

<body lang=ZH-CN link=blue vlink=purple style='text-justify-trim:punctuation'>

<div class=WordSection1 style='layout-grid:15.6pt'>

<p class=ab><a name="_Toc53320663"><span style='font-family:黑体'>程序</span><span
lang=EN-US>14-9 linux/include/string.h</span></a></p>

<div class=a align=center style='text-align:center'><span lang=EN-US>

<hr size=4 width="100%" align=center>

</span></div>

<p class=a><span lang=EN-US>&nbsp; <u><span style='color:blue'>1</span></u>
#ifndef <u><span style='color:blue'>_STRING_H_</span></u></span></p>

<p class=a><span lang=EN-US>&nbsp; <u><span style='color:blue'>2</span></u>
#define <u><span style='color:blue'>_STRING_H_</span></u></span></p>

<p class=a><span lang=EN-US>&nbsp; <u><span style='color:blue'>3</span></u> </span></p>

<p class=a><span lang=EN-US>&nbsp; <u><span style='color:blue'>4</span></u>
#ifndef <u><span style='color:blue'>NULL</span></u></span></p>

<p class=a><span lang=EN-US>&nbsp; <u><span style='color:blue'>5</span></u>
#define <u><span style='color:blue'>NULL</span></u> ((void *) 0)</span></p>

<p class=a><span lang=EN-US>&nbsp; <u><span style='color:blue'>6</span></u>
#endif</span></p>

<p class=a><span lang=EN-US>&nbsp; <u><span style='color:blue'>7</span></u> </span></p>

<p class=a><span lang=EN-US>&nbsp; <u><span style='color:blue'>8</span></u>
#ifndef <u><span style='color:blue'>_SIZE_T</span></u></span></p>

<p class=a><span lang=EN-US>&nbsp; <u><span style='color:blue'>9</span></u>
#define <u><span style='color:blue'>_SIZE_T</span></u></span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>10</span></u>
typedef unsigned int <u><span style='color:blue'>size_t</span></u>;</span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>11</span></u>
#endif</span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>12</span></u> </span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>13</span></u>
extern char * <u><span style='color:blue'>strerror</span></u>(int <u><span
style='color:blue'>errno</span></u>);</span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>14</span></u> </span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>15</span></u> <b><i>/*</i></b></span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>16</span></u> <b><i>&nbsp;*
This string-include defines all string functions as inline</i></b></span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>17</span></u> <b><i>&nbsp;*
functions. Use gcc. It also assumes ds=es=data space, this should be</i></b></span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>18</span></u> <b><i>&nbsp;*
normal. Most of the string-functions are rather heavily hand-optimized,</i></b></span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>19</span></u> <b><i>&nbsp;*
see especially strtok,strstr,str[c]spn. They should work, but are not</i></b></span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>20</span></u> <b><i>&nbsp;*
very easy to understand. Everything is done entirely within the register</i></b></span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>21</span></u> <b><i>&nbsp;*
set, making the functions fast and clean. String instructions have been</i></b></span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>22</span></u> <b><i>&nbsp;*
used through-out, making for &quot;slightly&quot; unclear code :-)</i></b></span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>23</span></u> <b><i>&nbsp;*</i></b></span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>24</span></u> <b><i>&nbsp;*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
(C) 1991 Linus Torvalds</i></b></span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>25</span></u> <b><i>&nbsp;*/</i></b></span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; /*</span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp; * </span>这个字符串头文件以内嵌函数的形式定义了所有字符串操作函数。使用<span
lang=EN-US>gcc</span>时，同时</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp; * </span>假定了<span
lang=EN-US>ds=es=</span>数据空间，这应该是常规的。绝大多数字符串函数都是经手工进行大量</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp; * </span>优化的，尤其是函数<span
lang=EN-US>strtok</span>、<span lang=EN-US>strstr</span>、<span lang=EN-US>str[c]spn</span>。它们应该能正常工作，但却不是那</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp; * </span>么容易理解。所有的操作基本上都是使用寄存器集来完成的，这使得函数即快又整洁。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp; * </span>所有地方都使用了字符串指令，这又使得代码“稍微”难以理解<span
lang=EN-US style='font-family:Wingdings'>J</span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp; *</span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;
*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
(C) 1991 Linus Torvalds</span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp; */</span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>26</span></u>&nbsp;
</span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; //// </span>将一个字符串<span
lang=EN-US>(src)</span>拷贝到另一个字符串<span lang=EN-US>(dest)</span>，直到遇到<span
lang=EN-US>NULL</span>字符后停止。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>参数：<span lang=EN-US>dest
- </span>目的字符串指针，<span lang=EN-US>src - </span>源字符串指针。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // %0 - esi(src)</span>，<span
lang=EN-US>%1 - edi(dest)</span>。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>27</span></u>
extern inline char * <u><span style='color:blue'>strcpy</span></u>(char *
dest,const char *src)</span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>28</span></u> {</span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>29</span></u>
__asm__(<i>&quot;cld\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>清方向位。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>30</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;1:\tlodsb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>加载<span lang=EN-US>DS:[esi]</span>处<span lang=EN-US>1</span>字节<span
lang=EN-US style='font-family:Wingdings'>è</span><span lang=EN-US>al</span>，并更新<span
lang=EN-US>esi</span>。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>31</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;stosb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>存储字节<span lang=EN-US>al</span><span lang=EN-US style='font-family:
Wingdings'>è</span><span lang=EN-US>ES:[edi]</span>，并更新<span lang=EN-US>edi</span>。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>32</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;testb %%al,%%al\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>刚存储的字节是<span lang=EN-US>0</span>？</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>33</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;jne 1b&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>不是则向后跳转到标号<span lang=EN-US>1</span>处，否则结束。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>34</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
::<i>&quot;S&quot;</i> (src),<i>&quot;D&quot;</i> (dest):<i>&quot;si&quot;</i>,<i>&quot;di&quot;</i>,<i>&quot;ax&quot;</i>);</span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>35</span></u>
return dest;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>返回目的字符串指针。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>36</span></u> }</span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>37</span></u> </span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; //// </span>拷贝源字符串<span
lang=EN-US>count</span>个字节到目的字符串。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>如果源串长度小于<span
lang=EN-US>count</span>个字节，就附加空字符<span lang=EN-US>(NULL)</span>到目的字符串。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>参数：<span lang=EN-US>dest
- </span>目的字符串指针，<span lang=EN-US>src - </span>源字符串指针，<span lang=EN-US>count - </span>拷贝字节数。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // %0 - esi(src)</span>，<span
lang=EN-US>%1 - edi(dest)</span>，<span lang=EN-US>%2 - ecx(count)</span>。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>38</span></u>
extern inline char * <u><span style='color:blue'>strncpy</span></u>(char *
dest,const char *src,int <u><span style='color:blue'>count</span></u>)</span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>39</span></u> {</span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>40</span></u>
__asm__(<i>&quot;cld\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>清方向位。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>41</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;1:\tdecl %2\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>寄存器<span lang=EN-US>ecx--</span>（<span lang=EN-US>count--</span>）。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>42</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;js 2f\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>如果<span
lang=EN-US>count&lt;0</span>则向前跳转到标号<span lang=EN-US>2</span>，结束。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>43</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;lodsb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>取<span lang=EN-US>ds:[esi]</span>处<span lang=EN-US>1</span>字节<span
lang=EN-US style='font-family:Wingdings'>è</span><span lang=EN-US>al</span>，并且<span
lang=EN-US>esi++</span>。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>44</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;stosb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>存储该字节<span lang=EN-US style='font-family:Wingdings'>è</span><span
lang=EN-US>es:[edi]</span>，并且<span lang=EN-US>edi++</span>。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>45</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;testb %%al,%%al\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>该字节是<span lang=EN-US>0</span>？</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>46</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;jne 1b\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>不是，则向前跳转到标号<span lang=EN-US>1</span>处继续拷贝。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>47</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;rep\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>否则，在目的串中存放剩余个数的空字符。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>48</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;stosb\n&quot;</i></span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>49</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;2:&quot;</i></span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>50</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
::<i>&quot;S&quot;</i> (src),<i>&quot;D&quot;</i> (dest),<i>&quot;c&quot;</i> (<u><span
style='color:blue'>count</span></u>):<i>&quot;si&quot;</i>,<i>&quot;di&quot;</i>,<i>&quot;ax&quot;</i>,<i>&quot;cx&quot;</i>);</span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>51</span></u>
return dest;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>返回目的字符串指针。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>52</span></u> }</span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>53</span></u> </span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; //// </span>将源字符串拷贝到目的字符串的末尾处。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>参数：<span lang=EN-US>dest
- </span>目的字符串指针，<span lang=EN-US>src - </span>源字符串指针。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // %0 - esi(src)</span>，<span
lang=EN-US>%1 - edi(dest)</span>，<span lang=EN-US>%2 - eax(0)</span>，<span
lang=EN-US>%3 - ecx(-1)</span>。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>54</span></u>
extern inline char * <u><span style='color:blue'>strcat</span></u>(char *
dest,const char * src)</span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>55</span></u> {</span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>56</span></u>
__asm__(<i>&quot;cld\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>清方向位。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>57</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;repne\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>比较<span lang=EN-US>al</span>与<span lang=EN-US>es:[edi]</span>字节，并更新<span
lang=EN-US>edi++</span>，</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>58</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;scasb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>直到找到目的串中是<span lang=EN-US>0</span>的字节，此时<span lang=EN-US>edi</span>已指向后<span
lang=EN-US>1</span>字节。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>59</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;decl %1\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>让<span lang=EN-US>es:[edi]</span>指向<span lang=EN-US>0</span>值字节。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>60</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;1:\tlodsb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>取源字符串字节<span lang=EN-US>ds:[esi]</span><span lang=EN-US
style='font-family:Wingdings'>è</span><span lang=EN-US>al</span>，并<span
lang=EN-US>esi++</span>。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>61</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;stosb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>将该字节存到<span lang=EN-US>es:[edi]</span>，并<span lang=EN-US>edi++</span>。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>62</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;testb %%al,%%al\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>该字节是<span lang=EN-US>0</span>？</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>63</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;jne 1b&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>不是，则向后跳转到标号<span lang=EN-US>1</span>处继续拷贝，否则结束。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>64</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
::<i>&quot;S&quot;</i> (src),<i>&quot;D&quot;</i> (dest),<i>&quot;a&quot;</i>
(0),<i>&quot;c&quot;</i> (0xffffffff):<i>&quot;si&quot;</i>,<i>&quot;di&quot;</i>,<i>&quot;ax&quot;</i>,<i>&quot;cx&quot;</i>);</span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>65</span></u>
return dest;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>返回目的字符串指针。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>66</span></u> }</span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>67</span></u> </span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; //// </span>将源字符串的<span
lang=EN-US>count</span>个字节复制到目的字符串的末尾处，最后添一空字符。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>参数：<span lang=EN-US>dest
- </span>目的字符串，<span lang=EN-US>src - </span>源字符串，<span lang=EN-US>count - </span>欲复制的字节数。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // %0 - esi(src)</span>，<span
lang=EN-US>%1 - edi(dest)</span>，<span lang=EN-US>%2 - eax(0)</span>，<span
lang=EN-US>%3 - ecx(-1)</span>，<span lang=EN-US>%4 - (count)</span>。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>68</span></u>
extern inline char * <u><span style='color:blue'>strncat</span></u>(char *
dest,const char * src,int <u><span style='color:blue'>count</span></u>)</span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>69</span></u> {</span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>70</span></u>
__asm__(<i>&quot;cld\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>清方向位。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>71</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;repne\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>比较<span lang=EN-US>al</span>与<span lang=EN-US>es:[edi]</span>字节，<span
lang=EN-US>edi++</span>。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>72</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;scasb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>直到找到目的串的末端<span lang=EN-US>0</span>值字节。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>73</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;decl %1\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// edi</span>指向该<span lang=EN-US>0</span>值字节。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>74</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;movl %4,%3\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>欲复制字节数<span lang=EN-US style='font-family:Wingdings'>è</span><span
lang=EN-US>ecx</span>。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>75</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;1:\tdecl %3\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// ecx--</span>（从<span lang=EN-US>0</span>开始计数）。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>76</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;js 2f\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // ecx &lt;0 ?</span>，是则向前跳转到标号<span
lang=EN-US>2</span>处。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>77</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;lodsb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>否则取<span lang=EN-US>ds:[esi]</span>处的字节<span lang=EN-US
style='font-family:Wingdings'>è</span><span lang=EN-US>al</span>，<span
lang=EN-US>esi++</span>。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>78</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;stosb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>存储到<span lang=EN-US>es:[edi]</span>处，<span lang=EN-US>edi++</span>。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>79</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;testb %%al,%%al\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>该字节值为<span lang=EN-US>0</span>？</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>80</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;jne 1b\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//
</span>不是则向后跳转到标号<span lang=EN-US>1</span>处，继续复制。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>81</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;2:\txorl %2,%2\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>将<span lang=EN-US>al</span>清零。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>82</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;stosb&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>存到<span lang=EN-US>es:[edi]</span>处。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>83</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
::<i>&quot;S&quot;</i> (src),<i>&quot;D&quot;</i> (dest),<i>&quot;a&quot;</i>
(0),<i>&quot;c&quot;</i> (0xffffffff),<i>&quot;g&quot;</i> (<u><span
style='color:blue'>count</span></u>)</span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>84</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
:<i>&quot;si&quot;</i>,<i>&quot;di&quot;</i>,<i>&quot;ax&quot;</i>,<i>&quot;cx&quot;</i>);</span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>85</span></u>
return dest;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>返回目的字符串指针。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>86</span></u> }</span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>87</span></u> </span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; //// </span>将一个字符串与另一个字符串进行比较。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>参数：<span lang=EN-US>cs
- </span>字符串<span lang=EN-US>1</span>，<span lang=EN-US>ct - </span>字符串<span
lang=EN-US>2</span>。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // %0 - eax(__res)</span>返回值，<span
lang=EN-US>%1 - edi(cs)</span>字符串<span lang=EN-US>1</span>指针，<span lang=EN-US>%2
- esi(ct)</span>字符串<span lang=EN-US>2</span>指针。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>返回：如果串<span
lang=EN-US>1 &gt; </span>串<span lang=EN-US>2</span>，则返回<span lang=EN-US>1</span>；串<span
lang=EN-US>1 = </span>串<span lang=EN-US>2</span>，则返回<span lang=EN-US>0</span>；串<span
lang=EN-US>1 &lt; </span>串<span lang=EN-US>2</span>，则返回<span lang=EN-US>-1</span>。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>第<span lang=EN-US>90</span>行定义了一个局部寄存器变量。该变量将被保存在<span
lang=EN-US>eax</span>寄存器中，以便于高效访问和操作。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>这种定义变量的方法主要用于内嵌汇编程序中。详细说明参见<span
lang=EN-US>gcc</span>手册<span lang=EN-US>“</span>指定寄存器中的变量<span lang=EN-US>”</span>。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>88</span></u>
extern inline int <u><span style='color:blue'>strcmp</span></u>(const char *
cs,const char * ct)</span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>89</span></u> {</span></p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>90</span></u>
register int __res __asm__(<i>&quot;ax&quot;</i>);&nbsp;&nbsp;&nbsp; // __res</span>是寄存器变量<span
lang=EN-US>(eax)</span>。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>91</span></u>
__asm__(<i>&quot;cld\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;// </span>清方向位。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>92</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;1:\tlodsb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>取字符串<span lang=EN-US>2</span>的字节<span lang=EN-US>ds:[esi]</span><span
lang=EN-US style='font-family:Wingdings'>è</span><span lang=EN-US>al</span>，并且<span
lang=EN-US>esi++</span>。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>93</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;scasb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// al</span>与字符串<span lang=EN-US>1</span>的字节<span lang=EN-US>es:[edi]</span>作比较，并且<span
lang=EN-US>edi++</span>。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>94</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;jne 2f\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>如果不相等，则向前跳转到标号<span
lang=EN-US>2</span>。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>95</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;testb %%al,%%al\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>该字节是<span lang=EN-US>0</span>值字节吗（字符串结尾）？</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>96</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;jne 1b\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>不是，则向后跳转到标号<span lang=EN-US>1</span>，继续比较。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>97</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;xorl %%eax,%%eax\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>是，则返回值<span
lang=EN-US>eax</span>清零，</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>98</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;jmp 3f\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>向前跳转到标号<span
lang=EN-US>3</span>，结束。</p>

<p class=a><span lang=EN-US>&nbsp;<u><span style='color:blue'>99</span></u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<i>&quot;2:\tmovl $1,%%eax\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // eax</span>中置<span
lang=EN-US>1</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>100</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;jl 3f\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>若前面比较中串<span lang=EN-US>2</span>字符<span
lang=EN-US>&lt;</span>串<span lang=EN-US>1</span>字符，则返回正值结束。</p>

<p class=a><u><span lang=EN-US style='color:blue'>101</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;negl
%%eax\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>否则<span lang=EN-US>eax = -eax</span>，返回负值，结束。</p>

<p class=a><u><span lang=EN-US style='color:blue'>102</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;3:&quot;</i></span></p>

<p class=a><u><span lang=EN-US style='color:blue'>103</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<i>&quot;=a&quot;</i>
(__res):<i>&quot;D&quot;</i> (cs),<i>&quot;S&quot;</i> (ct):<i>&quot;si&quot;</i>,<i>&quot;di&quot;</i>);</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>104</span></u><span
lang=EN-US> return __res;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>返回比较结果。</p>

<p class=a><u><span lang=EN-US style='color:blue'>105</span></u><span
lang=EN-US> }</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>106</span></u><span
lang=EN-US> </span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; //// </span>字符串<span lang=EN-US>1</span>与字符串<span
lang=EN-US>2</span>的前<span lang=EN-US>count</span>个字符进行比较。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>参数：<span lang=EN-US>cs
- </span>字符串<span lang=EN-US>1</span>，<span lang=EN-US>ct - </span>字符串<span
lang=EN-US>2</span>，<span lang=EN-US>count - </span>比较的字符数。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // %0 - eax(__res)</span>返回值，<span
lang=EN-US>%1 - edi(cs)</span>串<span lang=EN-US>1</span>指针，<span lang=EN-US>%2
- esi(ct)</span>串<span lang=EN-US>2</span>指针，<span lang=EN-US>%3 - ecx(count)</span>。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>返回：如果串<span
lang=EN-US>1 &gt; </span>串<span lang=EN-US>2</span>，则返回<span lang=EN-US>1</span>；串<span
lang=EN-US>1 = </span>串<span lang=EN-US>2</span>，则返回<span lang=EN-US>0</span>；串<span
lang=EN-US>1 &lt; </span>串<span lang=EN-US>2</span>，则返回<span lang=EN-US>-1</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>107</span></u><span
lang=EN-US> extern inline int <u><span style='color:blue'>strncmp</span></u>(const
char * cs,const char * ct,int <u><span style='color:blue'>count</span></u>)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>108</span></u><span
lang=EN-US> {</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>109</span></u><span
lang=EN-US> register int __res __asm__(<i>&quot;ax&quot;</i>);&nbsp;&nbsp;&nbsp;
// __res</span>是寄存器变量<span lang=EN-US>(eax)</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>110</span></u><span
lang=EN-US> __asm__(<i>&quot;cld\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>清方向位。</p>

<p class=a><u><span lang=EN-US style='color:blue'>111</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;1:\tdecl
%3\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// count--</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>112</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;js 2f\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>如果<span lang=EN-US>count&lt;0</span>，则向前跳转到标号<span
lang=EN-US>2</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>113</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;lodsb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>取串<span lang=EN-US>2</span>的字符<span lang=EN-US>ds:[esi]</span><span
lang=EN-US style='font-family:Wingdings'>è</span><span lang=EN-US>al</span>，并且<span
lang=EN-US>esi++</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>114</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;scasb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>比较<span lang=EN-US>al</span>与串<span lang=EN-US>1</span>的字符<span
lang=EN-US>es:[edi]</span>，并且<span lang=EN-US>edi++</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>115</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;jne 3f\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>如果不相等，则向前跳转到标号<span lang=EN-US>3</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>116</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;testb %%al,%%al\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>该字符是<span lang=EN-US>NULL</span>字符吗？</p>

<p class=a><u><span lang=EN-US style='color:blue'>117</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;jne
1b\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>不是，则向后跳转到标号<span lang=EN-US>1</span>，继续比较。</p>

<p class=a><u><span lang=EN-US style='color:blue'>118</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;2:\txorl
%%eax,%%eax\n\t&quot;</i>&nbsp;&nbsp; // </span>是<span lang=EN-US>NULL</span>字符，则<span
lang=EN-US>eax</span>清零（返回值）。</p>

<p class=a><u><span lang=EN-US style='color:blue'>119</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;jmp 4f\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>向前跳转到标号<span lang=EN-US>4</span>，结束。</p>

<p class=a><u><span lang=EN-US style='color:blue'>120</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;3:\tmovl
$1,%%eax\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // eax</span>中置<span
lang=EN-US>1</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>121</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;jl 4f\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>如果前面比较中串<span lang=EN-US>2</span>字符<span
lang=EN-US>&lt;</span>串<span lang=EN-US>1</span>字符，则返回<span lang=EN-US>1</span>结束。</p>

<p class=a><u><span lang=EN-US style='color:blue'>122</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;negl
%%eax\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>否则<span lang=EN-US>eax = -eax</span>，返回负值，结束。</p>

<p class=a><u><span lang=EN-US style='color:blue'>123</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;4:&quot;</i></span></p>

<p class=a><u><span lang=EN-US style='color:blue'>124</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<i>&quot;=a&quot;</i>
(__res):<i>&quot;D&quot;</i> (cs),<i>&quot;S&quot;</i> (ct),<i>&quot;c&quot;</i>
(<u><span style='color:blue'>count</span></u>):<i>&quot;si&quot;</i>,<i>&quot;di&quot;</i>,<i>&quot;cx&quot;</i>);</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>125</span></u><span
lang=EN-US> return __res;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>返回比较结果。</p>

<p class=a><u><span lang=EN-US style='color:blue'>126</span></u><span
lang=EN-US> }</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>127</span></u><span
lang=EN-US> </span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; //// </span>在字符串中寻找第一个匹配的字符。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>参数：<span lang=EN-US>s
- </span>字符串，<span lang=EN-US>c - </span>欲寻找的字符。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // %0 - eax(__res)</span>，<span
lang=EN-US>%1 - esi(</span>字符串指针<span lang=EN-US>s)</span>，<span lang=EN-US>%2
- eax(</span>字符<span lang=EN-US>c)</span>。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>返回：返回字符串中第一次出现匹配字符的指针。若没有找到匹配的字符，则返回空指针。</p>

<p class=a><u><span lang=EN-US style='color:blue'>128</span></u><span
lang=EN-US> extern inline char * <u><span style='color:blue'>strchr</span></u>(const
char * s,char c)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>129</span></u><span
lang=EN-US> {</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>130</span></u><span
lang=EN-US> register char * __res __asm__(<i>&quot;ax&quot;</i>); // __res</span>是寄存器变量<span
lang=EN-US>(eax)</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>131</span></u><span
lang=EN-US> __asm__(<i>&quot;cld\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>清方向位。</p>

<p class=a><u><span lang=EN-US style='color:blue'>132</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movb
%%al,%%ah\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>将欲比较字符移到<span lang=EN-US>ah</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>133</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;1:\tlodsb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>取字符串中字符<span lang=EN-US>ds:[esi]</span><span lang=EN-US
style='font-family:Wingdings'>è</span><span lang=EN-US>al</span>，并且<span
lang=EN-US>esi++</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>134</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;cmpb
%%ah,%%al\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>字符串中字符<span
lang=EN-US>al</span>与指定字符<span lang=EN-US>ah</span>相比较。</p>

<p class=a><u><span lang=EN-US style='color:blue'>135</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;je 2f\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>若相等，则向前跳转到标号<span lang=EN-US>2</span>处。</p>

<p class=a><u><span lang=EN-US style='color:blue'>136</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;testb
%%al,%%al\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // al</span>中字符是<span
lang=EN-US>NULL</span>字符吗？（字符串结尾？）</p>

<p class=a><u><span lang=EN-US style='color:blue'>137</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;jne
1b\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>若不是，则向后跳转到标号<span lang=EN-US>1</span>，继续比较。</p>

<p class=a><u><span lang=EN-US style='color:blue'>138</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl
$1,%1\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>是，则说明没有找到匹配字符，<span lang=EN-US>esi</span>置<span lang=EN-US>1</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>139</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;2:\tmovl
%1,%0\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>将指向匹配字符后一个字节处的指针值放入<span
lang=EN-US>eax</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>140</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;decl
%0&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>将指针调整为指向匹配的字符。</p>

<p class=a><u><span lang=EN-US style='color:blue'>141</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<i>&quot;=a&quot;</i>
(__res):<i>&quot;S&quot;</i> (s),<i>&quot;0&quot;</i> (c):<i>&quot;si&quot;</i>);</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>142</span></u><span
lang=EN-US> return __res;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>返回指针。</p>

<p class=a><u><span lang=EN-US style='color:blue'>143</span></u><span
lang=EN-US> }</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>144</span></u><span
lang=EN-US> </span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; //// </span>寻找字符串中指定字符最后一次出现的地方。（反向搜索字符串）</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>参数：<span lang=EN-US>s
- </span>字符串，<span lang=EN-US>c - </span>欲寻找的字符。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // %0 - edx(__res)</span>，<span
lang=EN-US>%1 - edx(0)</span>，<span lang=EN-US>%2 - esi(</span>字符串指针<span
lang=EN-US>s)</span>，<span lang=EN-US>%3 - eax(</span>字符<span lang=EN-US>c)</span>。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>返回：返回字符串中最后一次出现匹配字符的指针。若没有找到匹配的字符，则返回空指针。</p>

<p class=a><u><span lang=EN-US style='color:blue'>145</span></u><span
lang=EN-US> extern inline char * <u><span style='color:blue'>strrchr</span></u>(const
char * s,char c)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>146</span></u><span
lang=EN-US> {</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>147</span></u><span
lang=EN-US> register char * __res __asm__(<i>&quot;dx&quot;</i>); // __res</span>是寄存器变量<span
lang=EN-US>(edx)</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>148</span></u><span
lang=EN-US> __asm__(<i>&quot;cld\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>清方向位。</p>

<p class=a><u><span lang=EN-US style='color:blue'>149</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movb
%%al,%%ah\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>将欲寻找的字符移到<span lang=EN-US>ah</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>150</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;1:\tlodsb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>取字符串中字符<span lang=EN-US>ds:[esi]</span><span lang=EN-US
style='font-family:Wingdings'>è</span><span lang=EN-US>al</span>，并且<span
lang=EN-US>esi++</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>151</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;cmpb
%%ah,%%al\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>字符串中字符<span
lang=EN-US>al</span>与指定字符<span lang=EN-US>ah</span>作比较。</p>

<p class=a><u><span lang=EN-US style='color:blue'>152</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;jne 2f\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>若不相等，则向前跳转到标号<span lang=EN-US>2</span>处。</p>

<p class=a><u><span lang=EN-US style='color:blue'>153</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl
%%esi,%0\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
</span>将字符指针保存到<span lang=EN-US>edx</span>中。</p>

<p class=a><u><span lang=EN-US style='color:blue'>154</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;decl
%0\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>指针后退一位，指向字符串中匹配字符处。</p>

<p class=a><u><span lang=EN-US style='color:blue'>155</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;2:\ttestb
%%al,%%al\n\t&quot;</i>&nbsp;&nbsp;&nbsp; // </span>比较的字符是<span lang=EN-US>0</span>吗（到字符串尾）？</p>

<p class=a><u><span lang=EN-US style='color:blue'>156</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;jne
1b&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>不是则向后跳转到标号<span lang=EN-US>1</span>处，继续比较。</p>

<p class=a><u><span lang=EN-US style='color:blue'>157</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<i>&quot;=d&quot;</i>
(__res):<i>&quot;0&quot;</i> (0),<i>&quot;S&quot;</i> (s),<i>&quot;a&quot;</i>
(c):<i>&quot;ax&quot;</i>,<i>&quot;si&quot;</i>);</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>158</span></u><span
lang=EN-US> return __res;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>返回指针。</p>

<p class=a><u><span lang=EN-US style='color:blue'>159</span></u><span
lang=EN-US> }</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>160</span></u><span
lang=EN-US> </span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; //// </span>在字符串<span
lang=EN-US>1</span>中寻找第<span lang=EN-US>1</span>个字符序列，该字符序列中的任何字符都包含在字符串<span
lang=EN-US>2</span>中。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>参数：<span lang=EN-US>cs
- </span>字符串<span lang=EN-US>1</span>指针，<span lang=EN-US>ct - </span>字符串<span
lang=EN-US>2</span>指针。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // %0 - esi(__res)</span>，<span
lang=EN-US>%1 - eax(0)</span>，<span lang=EN-US>%2 - ecx(-1)</span>，<span
lang=EN-US>%3 - esi(</span>串<span lang=EN-US>1</span>指针<span lang=EN-US>cs)</span>，<span
lang=EN-US>%4 - (</span>串<span lang=EN-US>2</span>指针<span lang=EN-US>ct)</span>。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>返回字符串<span lang=EN-US>1</span>中包含字符串<span
lang=EN-US>2</span>中任何字符的首个字符序列的长度值。</p>

<p class=a><u><span lang=EN-US style='color:blue'>161</span></u><span
lang=EN-US> extern inline int <u><span style='color:blue'>strspn</span></u>(const
char * cs, const char * ct)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>162</span></u><span
lang=EN-US> {</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>163</span></u><span
lang=EN-US> register char * __res __asm__(<i>&quot;si&quot;</i>); // __res</span>是寄存器变量<span
lang=EN-US>(esi)</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>164</span></u><span
lang=EN-US> __asm__(<i>&quot;cld\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>清方向位。</p>

<p class=a><u><span lang=EN-US style='color:blue'>165</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl
%4,%%edi\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
</span>首先计算串<span lang=EN-US>2</span>的长度。串<span lang=EN-US>2</span>指针放入<span
lang=EN-US>edi</span>中。</p>

<p class=a><u><span lang=EN-US style='color:blue'>166</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;repne\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>比较<span lang=EN-US>al(0)</span>与串<span lang=EN-US>2</span>中的字符（<span
lang=EN-US>es:[edi]</span>），并<span lang=EN-US>edi++</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>167</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;scasb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>如果不相等就继续比较<span lang=EN-US>(ecx</span>逐步递减<span lang=EN-US>)</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>168</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;notl
%%ecx\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// ecx</span>中每位取反。</p>

<p class=a><u><span lang=EN-US style='color:blue'>169</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;decl
%%ecx\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// ecx--</span>，得串<span lang=EN-US>2</span>的长度值。</p>

<p class=a><u><span lang=EN-US style='color:blue'>170</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl
%%ecx,%%edx\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>将串<span
lang=EN-US>2</span>的长度值暂放入<span lang=EN-US>edx</span>中。</p>

<p class=a><u><span lang=EN-US style='color:blue'>171</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;1:\tlodsb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>取串<span lang=EN-US>1</span>字符<span lang=EN-US>ds:[esi]</span><span
lang=EN-US style='font-family:Wingdings'>è</span><span lang=EN-US>al</span>，并且<span
lang=EN-US>esi++</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>172</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;testb
%%al,%%al\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>该字符等于<span
lang=EN-US>0</span>值吗（串<span lang=EN-US>1</span>结尾）？</p>

<p class=a><u><span lang=EN-US style='color:blue'>173</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;je 2f\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>如果是，则向前跳转到标号<span lang=EN-US>2</span>处。</p>

<p class=a><u><span lang=EN-US style='color:blue'>174</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl %4,%%edi\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>取串<span lang=EN-US>2</span>头指针放入<span lang=EN-US>edi</span>中。</p>

<p class=a><u><span lang=EN-US style='color:blue'>175</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl
%%edx,%%ecx\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>再将串<span
lang=EN-US>2</span>的长度值放入<span lang=EN-US>ecx</span>中。</p>

<p class=a><u><span lang=EN-US style='color:blue'>176</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;repne\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>比较<span lang=EN-US>al</span>与串<span lang=EN-US>2</span>中字符<span
lang=EN-US>es:[edi]</span>，并且<span lang=EN-US>edi++</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>177</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;scasb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>如果不相等就继续比较。</p>

<p class=a><u><span lang=EN-US style='color:blue'>178</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;je
1b\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>如果相等，则向后跳转到标号<span lang=EN-US>1</span>处。</p>

<p class=a><u><span lang=EN-US style='color:blue'>179</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;2:\tdecl
%0&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// esi--</span>，指向最后一个包含在串<span lang=EN-US>2</span>中的字符。</p>

<p class=a><u><span lang=EN-US style='color:blue'>180</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<i>&quot;=S&quot;</i>
(__res):<i>&quot;a&quot;</i> (0),<i>&quot;c&quot;</i> (0xffffffff),<i>&quot;0&quot;</i>
(cs),<i>&quot;g&quot;</i> (ct)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>181</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<i>&quot;ax&quot;</i>,<i>&quot;cx&quot;</i>,<i>&quot;dx&quot;</i>,<i>&quot;di&quot;</i>);</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>182</span></u><span
lang=EN-US> return __res-cs;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>返回字符序列的长度值。</p>

<p class=a><u><span lang=EN-US style='color:blue'>183</span></u><span
lang=EN-US> }</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>184</span></u><span
lang=EN-US> </span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; //// </span>寻找字符串<span
lang=EN-US>1</span>中不包含字符串<span lang=EN-US>2</span>中任何字符的首个字符序列。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>参数：<span lang=EN-US>cs
- </span>字符串<span lang=EN-US>1</span>指针，<span lang=EN-US>ct - </span>字符串<span
lang=EN-US>2</span>指针。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // %0 - esi(__res)</span>，<span
lang=EN-US>%1 - eax(0)</span>，<span lang=EN-US>%2 - ecx(-1)</span>，<span
lang=EN-US>%3 - esi(</span>串<span lang=EN-US>1</span>指针<span lang=EN-US>cs)</span>，<span
lang=EN-US>%4 - (</span>串<span lang=EN-US>2</span>指针<span lang=EN-US>ct)</span>。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>返回字符串<span lang=EN-US>1</span>中不包含字符串<span
lang=EN-US>2</span>中任何字符的首个字符序列的长度值。</p>

<p class=a><u><span lang=EN-US style='color:blue'>185</span></u><span
lang=EN-US> extern inline int <u><span style='color:blue'>strcspn</span></u>(const
char * cs, const char * ct)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>186</span></u><span
lang=EN-US> {</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>187</span></u><span
lang=EN-US> register char * __res __asm__(<i>&quot;si&quot;</i>); // __res</span>是寄存器变量<span
lang=EN-US>(esi)</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>188</span></u><span
lang=EN-US> __asm__(<i>&quot;cld\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>清方向位。</p>

<p class=a><u><span lang=EN-US style='color:blue'>189</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl
%4,%%edi\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
</span>首先计算串<span lang=EN-US>2</span>的长度。串<span lang=EN-US>2</span>指针放入<span
lang=EN-US>edi</span>中。</p>

<p class=a><u><span lang=EN-US style='color:blue'>190</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;repne\n\t&quot;</i>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//
</span>比较<span lang=EN-US>al(0)</span>与串<span lang=EN-US>2</span>中的字符（<span
lang=EN-US>es:[edi]</span>），并<span lang=EN-US>edi++</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>191</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;scasb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>如果不相等就继续比较<span lang=EN-US>(ecx</span>逐步递减<span lang=EN-US>)</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>192</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;notl
%%ecx\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// ecx</span>中每位取反。</p>

<p class=a><u><span lang=EN-US style='color:blue'>193</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;decl
%%ecx\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// ecx--</span>，得串<span lang=EN-US>2</span>的长度值。</p>

<p class=a><u><span lang=EN-US style='color:blue'>194</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl %%ecx,%%edx\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>将串<span lang=EN-US>2</span>的长度值暂放入<span lang=EN-US>edx</span>中。</p>

<p class=a><u><span lang=EN-US style='color:blue'>195</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;1:\tlodsb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>取串<span lang=EN-US>1</span>字符<span lang=EN-US>ds:[esi]</span><span
lang=EN-US style='font-family:Wingdings'>è</span><span lang=EN-US>al</span>，并且<span
lang=EN-US>esi++</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>196</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;testb
%%al,%%al\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>该字符等于<span
lang=EN-US>0</span>值吗（串<span lang=EN-US>1</span>结尾）？</p>

<p class=a><u><span lang=EN-US style='color:blue'>197</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;je 2f\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>如果是，则向前跳转到标号<span lang=EN-US>2</span>处。</p>

<p class=a><u><span lang=EN-US style='color:blue'>198</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl
%4,%%edi\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
</span>取串<span lang=EN-US>2</span>头指针放入<span lang=EN-US>edi</span>中。</p>

<p class=a><u><span lang=EN-US style='color:blue'>199</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl
%%edx,%%ecx\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>再将串<span
lang=EN-US>2</span>的长度值放入<span lang=EN-US>ecx</span>中。</p>

<p class=a><u><span lang=EN-US style='color:blue'>200</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;repne\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>比较<span lang=EN-US>al</span>与串<span lang=EN-US>2</span>中字符<span
lang=EN-US>es:[edi]</span>，并且<span lang=EN-US>edi++</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>201</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;scasb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>如果不相等就继续比较。</p>

<p class=a><u><span lang=EN-US style='color:blue'>202</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;jne
1b\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// </span>如果不相等，则向后跳转到标号<span
lang=EN-US>1</span>处。</p>

<p class=a><u><span lang=EN-US style='color:blue'>203</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;2:\tdecl
%0&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// esi--</span>，指向最后一个包含在串<span lang=EN-US>2</span>中的字符。</p>

<p class=a><u><span lang=EN-US style='color:blue'>204</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<i>&quot;=S&quot;</i>
(__res):<i>&quot;a&quot;</i> (0),<i>&quot;c&quot;</i> (0xffffffff),<i>&quot;0&quot;</i>
(cs),<i>&quot;g&quot;</i> (ct)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>205</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<i>&quot;ax&quot;</i>,<i>&quot;cx&quot;</i>,<i>&quot;dx&quot;</i>,<i>&quot;di&quot;</i>);</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>206</span></u><span
lang=EN-US> return __res-cs;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>返回字符序列的长度值。</p>

<p class=a><u><span lang=EN-US style='color:blue'>207</span></u><span
lang=EN-US> }</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>208</span></u><span
lang=EN-US> </span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; //// </span>在字符串<span
lang=EN-US>1</span>中寻找首个包含在字符串<span lang=EN-US>2</span>中的任何字符。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>参数：<span lang=EN-US>cs
- </span>字符串<span lang=EN-US>1</span>的指针，<span lang=EN-US>ct - </span>字符串<span
lang=EN-US>2</span>的指针。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // %0 -esi(__res)</span>，<span
lang=EN-US>%1 -eax(0)</span>，<span lang=EN-US>%2 -ecx(0xffffffff)</span>，<span
lang=EN-US>%3 -esi(</span>串<span lang=EN-US>1</span>指针<span lang=EN-US>cs)</span>，<span
lang=EN-US>%4 -(</span>串<span lang=EN-US>2</span>指针<span lang=EN-US>ct)</span>。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>返回字符串<span lang=EN-US>1</span>中首个包含字符串<span
lang=EN-US>2</span>中字符的指针。</p>

<p class=a><u><span lang=EN-US style='color:blue'>209</span></u><span
lang=EN-US> extern inline char * <u><span style='color:blue'>strpbrk</span></u>(const
char * cs,const char * ct)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>210</span></u><span
lang=EN-US> {</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>211</span></u><span
lang=EN-US> register char * __res __asm__(<i>&quot;si&quot;</i>); // __res</span>是寄存器变量<span
lang=EN-US>(esi)</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>212</span></u><span
lang=EN-US> __asm__(<i>&quot;cld\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>清方向位。</p>

<p class=a><u><span lang=EN-US style='color:blue'>213</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl
%4,%%edi\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
</span>首先计算串<span lang=EN-US>2</span>的长度。串<span lang=EN-US>2</span>指针放入<span
lang=EN-US>edi</span>中。</p>

<p class=a><u><span lang=EN-US style='color:blue'>214</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;repne\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>比较<span lang=EN-US>al(0)</span>与串<span lang=EN-US>2</span>中的字符（<span
lang=EN-US>es:[edi]</span>），并<span lang=EN-US>edi++</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>215</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;scasb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>如果不相等就继续比较<span lang=EN-US>(ecx</span>逐步递减<span lang=EN-US>)</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>216</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;notl
%%ecx\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// ecx</span>中每位取反。</p>

<p class=a><u><span lang=EN-US style='color:blue'>217</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;decl
%%ecx\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// ecx--</span>，得串<span lang=EN-US>2</span>的长度值。</p>

<p class=a><u><span lang=EN-US style='color:blue'>218</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl
%%ecx,%%edx\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>将串<span
lang=EN-US>2</span>的长度值暂放入<span lang=EN-US>edx</span>中。</p>

<p class=a><u><span lang=EN-US style='color:blue'>219</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<i>&quot;1:\tlodsb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>取串<span lang=EN-US>1</span>字符<span lang=EN-US>ds:[esi]</span><span
lang=EN-US style='font-family:Wingdings'>è</span><span lang=EN-US>al</span>，并且<span
lang=EN-US>esi++</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>220</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;testb
%%al,%%al\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>该字符等于<span
lang=EN-US>0</span>值吗（串<span lang=EN-US>1</span>结尾）？</p>

<p class=a><u><span lang=EN-US style='color:blue'>221</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;je 2f\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>如果是，则向前跳转到标号<span lang=EN-US>2</span>处。</p>

<p class=a><u><span lang=EN-US style='color:blue'>222</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl
%4,%%edi\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
</span>取串<span lang=EN-US>2</span>头指针放入<span lang=EN-US>edi</span>中。</p>

<p class=a><u><span lang=EN-US style='color:blue'>223</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl
%%edx,%%ecx\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>再将串<span
lang=EN-US>2</span>的长度值放入<span lang=EN-US>ecx</span>中。</p>

<p class=a><u><span lang=EN-US style='color:blue'>224</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;repne\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>比较<span lang=EN-US>al</span>与串<span lang=EN-US>2</span>中字符<span
lang=EN-US>es:[edi]</span>，并且<span lang=EN-US>edi++</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>225</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;scasb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>如果不相等就继续比较。</p>

<p class=a><u><span lang=EN-US style='color:blue'>226</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;jne
1b\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>如果不相等，则向后跳转到标号<span lang=EN-US>1</span>处。</p>

<p class=a><u><span lang=EN-US style='color:blue'>227</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;decl %0\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// esi--</span>，指向一个包含在串<span lang=EN-US>2</span>中的字符。</p>

<p class=a><u><span lang=EN-US style='color:blue'>228</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;jmp 3f\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>向前跳转到标号<span lang=EN-US>3</span>处。</p>

<p class=a><u><span lang=EN-US style='color:blue'>229</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;2:\txorl
%0,%0\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>没有找到符合条件的，将返回值为<span lang=EN-US>NULL</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>230</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;3:&quot;</i></span></p>

<p class=a><u><span lang=EN-US style='color:blue'>231</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<i>&quot;=S&quot;</i>
(__res):<i>&quot;a&quot;</i> (0),<i>&quot;c&quot;</i> (0xffffffff),<i>&quot;0&quot;</i>
(cs),<i>&quot;g&quot;</i> (ct)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>232</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<i>&quot;ax&quot;</i>,<i>&quot;cx&quot;</i>,<i>&quot;dx&quot;</i>,<i>&quot;di&quot;</i>);</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>233</span></u><span
lang=EN-US> return __res;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>返回指针值。</p>

<p class=a><u><span lang=EN-US style='color:blue'>234</span></u><span
lang=EN-US> }</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>235</span></u><span
lang=EN-US> </span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; //// </span>在字符串<span
lang=EN-US>1</span>中寻找首个匹配整个字符串<span lang=EN-US>2</span>的字符串。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>参数：<span lang=EN-US>cs
- </span>字符串<span lang=EN-US>1</span>的指针，<span lang=EN-US>ct - </span>字符串<span
lang=EN-US>2</span>的指针。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // %0 -eax(__res)</span>，<span
lang=EN-US>%1 -eax(0)</span>，<span lang=EN-US>%2 -ecx(0xffffffff)</span>，<span
lang=EN-US>%3 -esi(</span>串<span lang=EN-US>1</span>指针<span lang=EN-US>cs)</span>，<span
lang=EN-US>%4 -(</span>串<span lang=EN-US>2</span>指针<span lang=EN-US>ct)</span>。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>返回：返回字符串<span
lang=EN-US>1</span>中首个匹配字符串<span lang=EN-US>2</span>的字符串指针。</p>

<p class=a><u><span lang=EN-US style='color:blue'>236</span></u><span
lang=EN-US> extern inline char * <u><span style='color:blue'>strstr</span></u>(const
char * cs,const char * ct)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>237</span></u><span
lang=EN-US> {</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>238</span></u><span
lang=EN-US> register char * __res __asm__(<i>&quot;ax&quot;</i>); // __res</span>是寄存器变量<span
lang=EN-US>(eax)</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>239</span></u><span
lang=EN-US> __asm__(<i>&quot;cld\n\t&quot;</i> \&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>清方向位。</p>

<p class=a><u><span lang=EN-US style='color:blue'>240</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl
%4,%%edi\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
</span>首先计算串<span lang=EN-US>2</span>的长度。串<span lang=EN-US>2</span>指针放入<span
lang=EN-US>edi</span>中。</p>

<p class=a><u><span lang=EN-US style='color:blue'>241</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;repne\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>比较<span lang=EN-US>al(0)</span>与串<span lang=EN-US>2</span>中的字符（<span
lang=EN-US>es:[edi]</span>），并<span lang=EN-US>edi++</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>242</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;scasb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>如果不相等就继续比较<span lang=EN-US>(ecx</span>逐步递减<span lang=EN-US>)</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>243</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;notl
%%ecx\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// ecx</span>中每位取反。</p>

<p class=a><u><span lang=EN-US style='color:blue'>244</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;decl
%%ecx\n\t&quot;</i>&nbsp;&nbsp;&nbsp; <b><i>/* NOTE! This also sets Z if
searchstring='' */</i></b></span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
/* </span>注意！如果搜索串为空，将设置<span lang=EN-US>Z</span>标志<span lang=EN-US> */ </span><span
lang=EN-US>// </span>得串<span lang=EN-US>2</span>的长度值。</p>

<p class=a><u><span lang=EN-US style='color:blue'>245</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl
%%ecx,%%edx\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>将串<span
lang=EN-US>2</span>的长度值暂放入<span lang=EN-US>edx</span>中。</p>

<p class=a><u><span lang=EN-US style='color:blue'>246</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;1:\tmovl
%4,%%edi\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>取串<span
lang=EN-US>2</span>头指针放入<span lang=EN-US>edi</span>中。</p>

<p class=a><u><span lang=EN-US style='color:blue'>247</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl
%%esi,%%eax\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>将串<span
lang=EN-US>1</span>的指针复制到<span lang=EN-US>eax</span>中。</p>

<p class=a><u><span lang=EN-US style='color:blue'>248</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl
%%edx,%%ecx\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>再将串<span
lang=EN-US>2</span>的长度值放入<span lang=EN-US>ecx</span>中。</p>

<p class=a><u><span lang=EN-US style='color:blue'>249</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;repe\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>比较串<span lang=EN-US>1</span>和串<span lang=EN-US>2</span>字符<span
lang=EN-US>(ds:[esi],es:[edi])</span>，<span lang=EN-US>esi++,edi++</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>250</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;cmpsb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>若对应字符相等就一直比较下去。</p>

<p class=a><u><span lang=EN-US style='color:blue'>251</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;je 2f\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b><i>/* also works for empty string, see above */</i></b></span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
/* </span>对空串同样有效，见上面<span lang=EN-US> */ // </span>若全相等，则转到标号<span lang=EN-US>2</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>252</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;xchgl
%%eax,%%esi\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>串<span
lang=EN-US>1</span>头指针<span lang=EN-US style='font-family:Wingdings'>è</span><span
lang=EN-US>esi</span>，比较结果的串<span lang=EN-US>1</span>指针<span lang=EN-US
style='font-family:Wingdings'>è</span><span lang=EN-US>eax</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>253</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;incl
%%esi\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>串<span lang=EN-US>1</span>头指针指向下一个字符。</p>

<p class=a><u><span lang=EN-US style='color:blue'>254</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;cmpb
$0,-1(%%eax)\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>串<span
lang=EN-US>1</span>指针<span lang=EN-US>(eax-1)</span>所指字节是<span lang=EN-US>0</span>吗？</p>

<p class=a><u><span lang=EN-US style='color:blue'>255</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;jne
1b\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>不是则转到标号<span lang=EN-US>1</span>，继续从串<span lang=EN-US>1</span>的第<span
lang=EN-US>2</span>个字符开始比较。</p>

<p class=a><u><span lang=EN-US style='color:blue'>256</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;xorl
%%eax,%%eax\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>清<span
lang=EN-US>eax</span>，表示没有找到匹配。</p>

<p class=a><u><span lang=EN-US style='color:blue'>257</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;2:&quot;</i></span></p>

<p class=a><u><span lang=EN-US style='color:blue'>258</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<i>&quot;=a&quot;</i>
(__res):<i>&quot;0&quot;</i> (0),<i>&quot;c&quot;</i> (0xffffffff),<i>&quot;S&quot;</i>
(cs),<i>&quot;g&quot;</i> (ct)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>259</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<i>&quot;cx&quot;</i>,<i>&quot;dx&quot;</i>,<i>&quot;di&quot;</i>,<i>&quot;si&quot;</i>);</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>260</span></u><span
lang=EN-US> return __res;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>返回比较结果。</p>

<p class=a><u><span lang=EN-US style='color:blue'>261</span></u><span
lang=EN-US> }</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>262</span></u><span
lang=EN-US> </span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; //// </span>计算字符串长度。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>参数：<span lang=EN-US>s
- </span>字符串。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // %0 - ecx(__res)</span>，<span
lang=EN-US>%1 - edi(</span>字符串指针<span lang=EN-US>s)</span>，<span lang=EN-US>%2
- eax(0)</span>，<span lang=EN-US>%3 - ecx(0xffffffff)</span>。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>返回：返回字符串的长度。</p>

<p class=a><u><span lang=EN-US style='color:blue'>263</span></u><span
lang=EN-US> extern inline int <u><span style='color:blue'>strlen</span></u>(const
char * s)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>264</span></u><span
lang=EN-US> {</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>265</span></u><span
lang=EN-US> register int __res __asm__(<i>&quot;cx&quot;</i>);&nbsp;&nbsp;&nbsp;
// __res</span>是寄存器变量<span lang=EN-US>(ecx)</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>266</span></u><span
lang=EN-US> __asm__(<i>&quot;cld\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>清方向位。</p>

<p class=a><u><span lang=EN-US style='color:blue'>267</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;repne\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// al(0)</span>与字符串中字符<span lang=EN-US>es:[edi]</span>比较，</p>

<p class=a><u><span lang=EN-US style='color:blue'>268</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;scasb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>若不相等就一直比较。</p>

<p class=a><u><span lang=EN-US style='color:blue'>269</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;notl
%0\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// ecx</span>取反。</p>

<p class=a><u><span lang=EN-US style='color:blue'>270</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;decl
%0&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// ecx--</span>，得字符串得长度值。</p>

<p class=a><u><span lang=EN-US style='color:blue'>271</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<i>&quot;=c&quot;</i>
(__res):<i>&quot;D&quot;</i> (s),<i>&quot;a&quot;</i> (0),<i>&quot;0&quot;</i>
(0xffffffff):<i>&quot;di&quot;</i>);</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>272</span></u><span
lang=EN-US> return __res;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>返回字符串长度值。</p>

<p class=a><u><span lang=EN-US style='color:blue'>273</span></u><span
lang=EN-US> }</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>274</span></u><span
lang=EN-US> </span></p>

<p class=a><u><span lang=EN-US style='color:blue'>275</span></u><span
lang=EN-US> extern char * <u><span style='color:blue'>___strtok</span></u>;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>用于临时存放指向下面被分析字符串<span lang=EN-US>1(s)</span>的指针。</p>

<p class=a><u><span lang=EN-US style='color:blue'>276</span></u><span
lang=EN-US> </span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; //// </span>利用字符串<span
lang=EN-US>2</span>中的字符将字符串<span lang=EN-US>1</span>分割成标记<span lang=EN-US>(tokern)</span>序列。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>将串<span lang=EN-US>1</span>看作是包含零个或多个单词<span
lang=EN-US>(token)</span>的序列，并由分割符字符串<span lang=EN-US>2</span>中的一个或多个字符</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>分开。第一次调用 <span
lang=EN-US>strtok()</span>时，将返回指向字符串<span lang=EN-US>1</span>中第<span
lang=EN-US>1</span>个<span lang=EN-US>token</span>首字符的指针，并在返</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>回<span lang=EN-US>token</span>时将一
<span lang=EN-US>null</span>字符写到分割符处。后续使用 <span lang=EN-US>null </span>作为字符串<span
lang=EN-US>1</span>的调用，将用这种方</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>法继续扫描字符串<span
lang=EN-US>1</span>，直到没有<span lang=EN-US>token </span>为止。在不同的调用过程中，分割符串<span
lang=EN-US>2</span>可以不同。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>参数：<span lang=EN-US>s
- </span>待处理的字符串<span lang=EN-US>1</span>，<span lang=EN-US>ct - </span>包含各个分割符的字符串<span
lang=EN-US>2</span>。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>汇编输出：<span lang=EN-US>%0
- ebx(__res)</span>，<span lang=EN-US>%1 - esi(__strtok)</span>；</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>汇编输入：<span lang=EN-US>%2
- ebx(__strtok)</span>，<span lang=EN-US>%3 - esi(</span>字符串<span lang=EN-US>1</span>指针<span
lang=EN-US>s)</span>，<span lang=EN-US>%4 - (</span>字符串<span lang=EN-US>2</span>指针<span
lang=EN-US>ct)</span>。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>返回：返回字符串<span
lang=EN-US>s</span>中第<span lang=EN-US>1</span>个<span lang=EN-US>token</span>，如果没有找到<span
lang=EN-US>token</span>，则返回一个<span lang=EN-US>null</span>指针。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>后续使用字符串<span
lang=EN-US>s</span>指针为<span lang=EN-US>null</span>的调用，将在原字符串<span lang=EN-US>s</span>中搜索下一个<span
lang=EN-US>token</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>277</span></u><span
lang=EN-US> extern inline char * <u><span style='color:blue'>strtok</span></u>(char
* s,const char * ct)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>278</span></u><span
lang=EN-US> {</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>279</span></u><span
lang=EN-US> register char * __res __asm__(<i>&quot;si&quot;</i>);</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>280</span></u><span
lang=EN-US> __asm__(<i>&quot;testl %1,%1\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// </span>首先测试<span lang=EN-US>esi(</span>字符串<span
lang=EN-US>1</span>指针<span lang=EN-US>s)</span>是否是<span lang=EN-US>NULL</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>281</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;jne 1f\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>如果不是，则表明是首次调用本函数，跳转标号<span lang=EN-US>1</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>282</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;testl
%0,%0\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>若是<span lang=EN-US>NULL</span>，表示此次是后续调用，测<span lang=EN-US>ebx(__strtok)</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>283</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;je 8f\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>如果<span lang=EN-US>ebx</span>指针是<span
lang=EN-US>NULL</span>，则不能处理，跳转结束。</p>

<p class=a><u><span lang=EN-US style='color:blue'>284</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<i>&quot;movl
%0,%1\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>将<span lang=EN-US>ebx</span>指针复制到<span lang=EN-US>esi</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>285</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;1:\txorl
%0,%0\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>清<span
lang=EN-US>ebx</span>指针。</p>

<p class=a><u><span lang=EN-US style='color:blue'>286</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl
$-1,%%ecx\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>置<span
lang=EN-US>ecx = 0xffffffff</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>287</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;xorl
%%eax,%%eax\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>清零<span
lang=EN-US>eax</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>288</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;cld\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>清方向位。</p>

<p class=a><u><span lang=EN-US style='color:blue'>289</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl
%4,%%edi\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
</span>下面求字符串<span lang=EN-US>2</span>的长度。<span lang=EN-US>edi</span>指向字符串<span
lang=EN-US>2</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>290</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;repne\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>将<span lang=EN-US>al(0)</span>与<span lang=EN-US>es:[edi]</span>比较，并且<span
lang=EN-US>edi++</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>291</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;scasb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>直到找到字符串<span lang=EN-US>2</span>的结束<span lang=EN-US>null</span>字符，或计数<span
lang=EN-US>ecx==0</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>292</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;notl
%%ecx\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>将<span lang=EN-US>ecx</span>取反，</p>

<p class=a><u><span lang=EN-US style='color:blue'>293</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;decl
%%ecx\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// ecx--</span>，得到字符串<span lang=EN-US>2</span>的长度值。</p>

<p class=a><u><span lang=EN-US style='color:blue'>294</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;je 7f\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b><i>/* empty delimeter-string */</i></b></span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
/* </span>分割符字符串空<span lang=EN-US> */ // </span>若串<span lang=EN-US>2</span>长度为<span
lang=EN-US>0</span>，则转标号<span lang=EN-US>7</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>295</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl
%%ecx,%%edx\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>将串<span
lang=EN-US>2</span>长度暂存入<span lang=EN-US>edx</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>296</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;2:\tlodsb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>取串<span lang=EN-US>1</span>的字符<span lang=EN-US>ds:[esi]</span><span
lang=EN-US style='font-family:Wingdings'>è</span><span lang=EN-US>al</span>，并且<span
lang=EN-US>esi++</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>297</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;testb
%%al,%%al\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>该字符为<span
lang=EN-US>0</span>值吗<span lang=EN-US>(</span>串<span lang=EN-US>1</span>结束<span
lang=EN-US>)</span>？</p>

<p class=a><u><span lang=EN-US style='color:blue'>298</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;je 7f\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>如果是，则跳转标号<span lang=EN-US>7</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>299</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl %4,%%edi\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// edi</span>再次指向串<span lang=EN-US>2</span>首。</p>

<p class=a><u><span lang=EN-US style='color:blue'>300</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl
%%edx,%%ecx\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>取串<span
lang=EN-US>2</span>的长度值置入计数器<span lang=EN-US>ecx</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>301</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;repne\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>将<span lang=EN-US>al</span>中串<span lang=EN-US>1</span>的字符与串<span
lang=EN-US>2</span>中所有字符比较，</p>

<p class=a><u><span lang=EN-US style='color:blue'>302</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;scasb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>判断该字符是否为分割符。</p>

<p class=a><u><span lang=EN-US style='color:blue'>303</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;je
2b\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// </span>若能在串<span lang=EN-US>2</span>中找到相同字符（分割符），则跳转标号<span
lang=EN-US>2</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>304</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;decl
%1\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>若不是分割符，则串<span lang=EN-US>1</span>指针<span lang=EN-US>esi</span>指向此时的该字符。</p>

<p class=a><u><span lang=EN-US style='color:blue'>305</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;cmpb
$0,(%1)\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>该字符是<span lang=EN-US>NULL</span>字符吗？</p>

<p class=a><u><span lang=EN-US style='color:blue'>306</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;je 7f\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>若是，则跳转标号<span lang=EN-US>7</span>处。</p>

<p class=a><u><span lang=EN-US style='color:blue'>307</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl
%1,%0\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;// </span>将该字符的指针<span lang=EN-US>esi</span>存放在<span lang=EN-US>ebx</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>308</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;3:\tlodsb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>取串<span lang=EN-US>1</span>下一个字符<span lang=EN-US>ds:[esi]</span><span
lang=EN-US style='font-family:Wingdings'>è</span><span lang=EN-US>al</span>，并且<span
lang=EN-US>esi++</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>309</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;testb
%%al,%%al\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>该字符是<span
lang=EN-US>NULL</span>字符吗？</p>

<p class=a><u><span lang=EN-US style='color:blue'>310</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;je 5f\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>若是，表示串<span lang=EN-US>1</span>结束，跳转到标号<span
lang=EN-US>5</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>311</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl
%4,%%edi\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
edi</span>再次指向串<span lang=EN-US>2</span>首。</p>

<p class=a><u><span lang=EN-US style='color:blue'>312</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl
%%edx,%%ecx\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>串<span
lang=EN-US>2</span>长度值置入计数器<span lang=EN-US>ecx</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>313</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;repne\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>将<span lang=EN-US>al</span>中串<span lang=EN-US>1</span>的字符与串<span
lang=EN-US>2</span>中每个字符比较，</p>

<p class=a><u><span lang=EN-US style='color:blue'>314</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;scasb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>测试<span lang=EN-US>al</span>字符是否是分割符。</p>

<p class=a><u><span lang=EN-US style='color:blue'>315</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;jne
3b\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>若不是分割符则跳转标号<span lang=EN-US>3</span>，检测串<span lang=EN-US>1</span>中下一个字符。</p>

<p class=a><u><span lang=EN-US style='color:blue'>316</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;decl
%1\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>若是分割符，则<span lang=EN-US>esi--</span>，指向该分割符字符。</p>

<p class=a><u><span lang=EN-US style='color:blue'>317</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;cmpb
$0,(%1)\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>该分割符是<span lang=EN-US>NULL</span>字符吗？</p>

<p class=a><u><span lang=EN-US style='color:blue'>318</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;je 5f\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>若是，则跳转到标号<span lang=EN-US>5</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>319</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movb
$0,(%1)\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>若不是，则将该分割符用<span lang=EN-US>NULL</span>字符替换掉。</p>

<p class=a><u><span lang=EN-US style='color:blue'>320</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;incl
%1\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// esi</span>指向串<span lang=EN-US>1</span>中下一个字符，也即剩余串首。</p>

<p class=a><u><span lang=EN-US style='color:blue'>321</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;jmp 6f\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>跳转标号<span lang=EN-US>6</span>处。</p>

<p class=a><u><span lang=EN-US style='color:blue'>322</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;5:\txorl
%1,%1\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// esi</span>清零。</p>

<p class=a><u><span lang=EN-US style='color:blue'>323</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;6:\tcmpb
$0,(%0)\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // ebx</span>指针指向<span
lang=EN-US>NULL</span>字符吗？</p>

<p class=a><u><span lang=EN-US style='color:blue'>324</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;jne 7f\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>若不是，则跳转标号<span lang=EN-US>7</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>325</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;xorl
%0,%0\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>若是，则让<span lang=EN-US>ebx=NULL</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>326</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;7:\ttestl
%0,%0\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // ebx</span>指针为<span
lang=EN-US>NULL</span>吗？</p>

<p class=a><u><span lang=EN-US style='color:blue'>327</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;jne 8f\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>若不是则跳转<span lang=EN-US>8</span>，结束汇编代码。</p>

<p class=a><u><span lang=EN-US style='color:blue'>328</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl
%0,%1\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//
</span>将<span lang=EN-US>esi</span>置为<span lang=EN-US>NULL</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>329</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;8:&quot;</i></span></p>

<p class=a><u><span lang=EN-US style='color:blue'>330</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<i>&quot;=b&quot;</i>
(__res),<i>&quot;=S&quot;</i> (<u><span style='color:blue'>___strtok</span></u>)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>331</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<i>&quot;0&quot;</i>
(<u><span style='color:blue'>___strtok</span></u>),<i>&quot;1&quot;</i> (s),<i>&quot;g&quot;</i>
(ct)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>332</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<i>&quot;ax&quot;</i>,<i>&quot;cx&quot;</i>,<i>&quot;dx&quot;</i>,<i>&quot;di&quot;</i>);</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>333</span></u><span
lang=EN-US> return __res;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>返回指向新<span lang=EN-US>token</span>的指针。</p>

<p class=a><u><span lang=EN-US style='color:blue'>334</span></u><span
lang=EN-US> }</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>335</span></u><span
lang=EN-US> </span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; //// </span>内存块复制。从源地址<span
lang=EN-US>src</span>处开始复制<span lang=EN-US>n</span>个字节到目的地址<span lang=EN-US>dest</span>处。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>参数：<span lang=EN-US>dest
- </span>复制的目的地址，<span lang=EN-US>src - </span>复制的源地址，<span lang=EN-US>n - </span>复制字节数。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // %0 - ecx(n)</span>，<span
lang=EN-US>%1 - esi(src)</span>，<span lang=EN-US>%2 - edi(dest)</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>336</span></u><span
lang=EN-US> extern inline void * <u><span style='color:blue'>memcpy</span></u>(void
* dest,const void * src, int n)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>337</span></u><span
lang=EN-US> {</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>338</span></u><span
lang=EN-US> __asm__(<i>&quot;cld\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>清方向位。</p>

<p class=a><u><span lang=EN-US style='color:blue'>339</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;rep\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>重复执行复制<span lang=EN-US>ecx</span>个字节，</p>

<p class=a><u><span lang=EN-US style='color:blue'>340</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movsb&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>从<span lang=EN-US>ds:[esi]</span>到<span lang=EN-US>es:[edi]</span>，<span
lang=EN-US>esi++</span>，<span lang=EN-US>edi++</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>341</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ::<i>&quot;c&quot;</i>
(n),<i>&quot;S&quot;</i> (src),<i>&quot;D&quot;</i> (dest)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>342</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<i>&quot;cx&quot;</i>,<i>&quot;si&quot;</i>,<i>&quot;di&quot;</i>);</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>343</span></u><span
lang=EN-US> return dest;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>返回目的地址。</p>

<p class=a><u><span lang=EN-US style='color:blue'>344</span></u><span
lang=EN-US> }</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>345</span></u><span
lang=EN-US> </span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; //// </span>内存块移动。同内存块复制，但考虑移动的方向。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>参数：<span lang=EN-US>dest
- </span>复制的目的地址，<span lang=EN-US>src - </span>复制的源地址，<span lang=EN-US>n - </span>复制字节数。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>若<span lang=EN-US>dest&lt;src</span>则：<span
lang=EN-US>%0 - ecx(n)</span>，<span lang=EN-US>%1 - esi(src)</span>，<span
lang=EN-US>%2 - edi(dest)</span>。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>否则：<span lang=EN-US>%0
- ecx(n)</span>，<span lang=EN-US>%1 - esi(src+n-1)</span>，<span lang=EN-US>%2 -
edi(dest+n-1)</span>。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>这样操作是为了防止在复制时错误地重叠覆盖。</p>

<p class=a><u><span lang=EN-US style='color:blue'>346</span></u><span
lang=EN-US> extern inline void * <u><span style='color:blue'>memmove</span></u>(void
* dest,const void * src, int n)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>347</span></u><span
lang=EN-US> {</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>348</span></u><span
lang=EN-US> if (dest&lt;src)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>349</span></u><span
lang=EN-US> __asm__(<i>&quot;cld\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>清方向位。</p>

<p class=a><u><span lang=EN-US style='color:blue'>350</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;rep\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>从<span lang=EN-US>ds:[esi]</span>到<span lang=EN-US>es:[edi]</span>，并且<span
lang=EN-US>esi++</span>，<span lang=EN-US>edi++</span>，</p>

<p class=a><u><span lang=EN-US style='color:blue'>351</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movsb&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;// </span>重复执行复制<span lang=EN-US>ecx</span>字节。</p>

<p class=a><u><span lang=EN-US style='color:blue'>352</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ::<i>&quot;c&quot;</i>
(n),<i>&quot;S&quot;</i> (src),<i>&quot;D&quot;</i> (dest)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>353</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<i>&quot;cx&quot;</i>,<i>&quot;si&quot;</i>,<i>&quot;di&quot;</i>);</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>354</span></u><span
lang=EN-US> else</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>355</span></u><span
lang=EN-US> __asm__(<i>&quot;std\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>置方向位，从末端开始复制。</p>

<p class=a><u><span lang=EN-US style='color:blue'>356</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;rep\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>从<span lang=EN-US>ds:[esi]</span>到<span lang=EN-US>es:[edi]</span>，并且<span
lang=EN-US>esi--</span>，<span lang=EN-US>edi--</span>，</p>

<p class=a><u><span lang=EN-US style='color:blue'>357</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movsb&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>复制<span lang=EN-US>ecx</span>个字节。</p>

<p class=a><u><span lang=EN-US style='color:blue'>358</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ::<i>&quot;c&quot;</i>
(n),<i>&quot;S&quot;</i> (src+n-1),<i>&quot;D&quot;</i> (dest+n-1)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>359</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<i>&quot;cx&quot;</i>,<i>&quot;si&quot;</i>,<i>&quot;di&quot;</i>);</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>360</span></u><span
lang=EN-US> return dest;</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>361</span></u><span
lang=EN-US> }</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>362</span></u><span
lang=EN-US> </span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; //// </span>比较<span lang=EN-US>n</span>个字节的两块内存（两个字符串），即使遇上<span
lang=EN-US>NULL</span>字节也不停止比较。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>参数：<span lang=EN-US>cs
- </span>内存块<span lang=EN-US>1</span>地址，<span lang=EN-US>ct - </span>内存块<span
lang=EN-US>2</span>地址，<span lang=EN-US>count - </span>比较的字节数。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // %0 - eax(__res)</span>，<span
lang=EN-US>%1 - eax(0)</span>，<span lang=EN-US>%2 - edi(</span>内存块<span
lang=EN-US>1)</span>，<span lang=EN-US>%3 - esi(</span>内存块<span lang=EN-US>2)</span>，<span
lang=EN-US>%4 - ecx(count)</span>。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>返回：若块<span lang=EN-US>1&gt;</span>块<span
lang=EN-US>2 </span>返回<span lang=EN-US>1</span>；块<span lang=EN-US>1&lt;</span>块<span
lang=EN-US>2</span>，返回<span lang=EN-US>-1</span>；块<span lang=EN-US>1==</span>块<span
lang=EN-US>2</span>，则返回<span lang=EN-US>0</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>363</span></u><span
lang=EN-US> extern inline int <u><span style='color:blue'>memcmp</span></u>(const
void * cs,const void * ct,int <u><span style='color:blue'>count</span></u>)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>364</span></u><span
lang=EN-US> {</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>365</span></u><span
lang=EN-US> register int __res __asm__(<i>&quot;ax&quot;</i>);&nbsp;&nbsp;&nbsp;
// __res</span>是寄存器变量。</p>

<p class=a><u><span lang=EN-US style='color:blue'>366</span></u><span
lang=EN-US> __asm__(<i>&quot;cld\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>清方向位。</p>

<p class=a><u><span lang=EN-US style='color:blue'>367</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;repe\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>如果相等则重复，</p>

<p class=a><u><span lang=EN-US style='color:blue'>368</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;cmpsb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>比较<span lang=EN-US>ds:[esi]</span>与<span lang=EN-US>es:[edi]</span>的内容，并且<span
lang=EN-US>esi++</span>，<span lang=EN-US>edi++</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>369</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;je 1f\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>如果都相同，则跳转到标号<span lang=EN-US>1</span>，返回<span
lang=EN-US>0(eax)</span>值</p>

<p class=a><u><span lang=EN-US style='color:blue'>370</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;movl
$1,%%eax\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //
</span>否则<span lang=EN-US>eax</span>置<span lang=EN-US>1</span>，</p>

<p class=a><u><span lang=EN-US style='color:blue'>371</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;jl 1f\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>若内存块<span lang=EN-US>2</span>内容的值<span
lang=EN-US>&lt;</span>内存块<span lang=EN-US>1</span>，则跳转标号<span lang=EN-US>1</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>372</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;negl
%%eax\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>否则<span lang=EN-US>eax = -eax</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>373</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;1:&quot;</i></span></p>

<p class=a><u><span lang=EN-US style='color:blue'>374</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<i>&quot;=a&quot;</i>
(__res):<i>&quot;0&quot;</i> (0),<i>&quot;D&quot;</i> (cs),<i>&quot;S&quot;</i>
(ct),<i>&quot;c&quot;</i> (<u><span style='color:blue'>count</span></u>)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>375</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<i>&quot;si&quot;</i>,<i>&quot;di&quot;</i>,<i>&quot;cx&quot;</i>);</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>376</span></u><span
lang=EN-US> return __res;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>返回比较结果。</p>

<p class=a><u><span lang=EN-US style='color:blue'>377</span></u><span
lang=EN-US> }</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>378</span></u><span
lang=EN-US> </span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; //// </span>在<span lang=EN-US>n</span>字节大小的内存块<span
lang=EN-US>(</span>字符串<span lang=EN-US>)</span>中寻找指定字符。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>参数：<span lang=EN-US>cs
- </span>指定内存块地址，<span lang=EN-US>c - </span>指定的字符，<span lang=EN-US>count - </span>内存块长度。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // %0 - edi(__res)</span>，<span
lang=EN-US>%1 - eax(</span>字符<span lang=EN-US>c)</span>，<span lang=EN-US>%2 - edi(</span>内存块地址<span
lang=EN-US>cs)</span>，<span lang=EN-US>%3 - ecx(</span>字节数<span lang=EN-US>count)</span>。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>返回第一个匹配字符的指针，如果没有找到，则返回<span
lang=EN-US>NULL</span>字符。</p>

<p class=a><u><span lang=EN-US style='color:blue'>379</span></u><span
lang=EN-US> extern inline void * <u><span style='color:blue'>memchr</span></u>(const
void * cs,char c,int <u><span style='color:blue'>count</span></u>)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>380</span></u><span
lang=EN-US> {</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>381</span></u><span
lang=EN-US> register void * __res __asm__(<i>&quot;di&quot;</i>); // __res</span>是寄存器变量。</p>

<p class=a><u><span lang=EN-US style='color:blue'>382</span></u><span
lang=EN-US> if (!<u><span style='color:blue'>count</span></u>)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>如果内存块长度<span lang=EN-US>==0</span>，则返回<span lang=EN-US>NULL</span>，没有找到。</p>

<p class=a><u><span lang=EN-US style='color:blue'>383</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return <u><span
style='color:blue'>NULL</span></u>;</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>384</span></u><span
lang=EN-US> __asm__(<i>&quot;cld\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>清方向位。</p>

<p class=a><u><span lang=EN-US style='color:blue'>385</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;repne\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>如果不相等则重复执行下面语句，</p>

<p class=a><u><span lang=EN-US style='color:blue'>386</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;scasb\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// al</span>中字符与<span lang=EN-US>es:[edi]</span>字符作比较，并且<span lang=EN-US>edi++</span>，</p>

<p class=a><u><span lang=EN-US style='color:blue'>387</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;je 1f\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // </span>如果相等则向前跳转到标号<span lang=EN-US>1</span>处。</p>

<p class=a><u><span lang=EN-US style='color:blue'>388</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;<i>&quot;movl
$1,%0\n&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>否则<span lang=EN-US>edi</span>中置<span lang=EN-US>1</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>389</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;1:\tdecl
%0&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>让<span lang=EN-US>edi</span>指向找到的字符（或是<span lang=EN-US>NULL</span>）。</p>

<p class=a><u><span lang=EN-US style='color:blue'>390</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<i>&quot;=D&quot;</i>
(__res):<i>&quot;a&quot;</i> (c),<i>&quot;D&quot;</i> (cs),<i>&quot;c&quot;</i>
(<u><span style='color:blue'>count</span></u>)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>391</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<i>&quot;cx&quot;</i>);</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>392</span></u><span
lang=EN-US> return __res;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>返回字符指针。</p>

<p class=a><u><span lang=EN-US style='color:blue'>393</span></u><span
lang=EN-US> }</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>394</span></u><span
lang=EN-US> </span></p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; //// </span>用字符填写指定长度内存块。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // </span>用字符<span lang=EN-US>c</span>填写<span
lang=EN-US>s</span>指向的内存区域，共填<span lang=EN-US>count</span>字节。</p>

<p class=a><span lang=EN-US>&nbsp;&nbsp;&nbsp; // %0 - eax(</span>字符<span
lang=EN-US>c)</span>，<span lang=EN-US>%1 - edi(</span>内存地址<span lang=EN-US>)</span>，<span
lang=EN-US>%2 - ecx(</span>字节数<span lang=EN-US>count)</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>395</span></u><span
lang=EN-US> extern inline void * <u><span style='color:blue'>memset</span></u>(void
* s,char c,int <u><span style='color:blue'>count</span></u>)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>396</span></u><span
lang=EN-US> {</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>397</span></u><span
lang=EN-US> __asm__(<i>&quot;cld\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>清方向位。</p>

<p class=a><u><span lang=EN-US style='color:blue'>398</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;rep\n\t&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// </span>重复<span
lang=EN-US>ecx</span>指定的次数，执行</p>

<p class=a><u><span lang=EN-US style='color:blue'>399</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>&quot;stosb&quot;</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
// </span>将<span lang=EN-US>al</span>中字符存入<span lang=EN-US>es:[edi]</span>中，并且<span
lang=EN-US>edi++</span>。</p>

<p class=a><u><span lang=EN-US style='color:blue'>400</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ::<i>&quot;a&quot;</i>
(c),<i>&quot;D&quot;</i> (s),<i>&quot;c&quot;</i> (<u><span style='color:blue'>count</span></u>)</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>401</span></u><span
lang=EN-US>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :<i>&quot;cx&quot;</i>,<i>&quot;di&quot;</i>);</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>402</span></u><span
lang=EN-US> return s;</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>403</span></u><span
lang=EN-US> }</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>404</span></u><span
lang=EN-US> </span></p>

<p class=a><u><span lang=EN-US style='color:blue'>405</span></u><span
lang=EN-US> #endif</span></p>

<p class=a><u><span lang=EN-US style='color:blue'>406</span></u><span
lang=EN-US> </span></p>

<div class=a align=center style='text-align:center'><span lang=EN-US>

<hr size=4 width="100%" align=center>

</span></div>

<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>

<p class=MsoNormal><span lang=EN-US>&nbsp;</span></p>

</div>

</body>

</html>
